4 ms·
This article starts with naive code that is unlikely to be written by working scientists unless they are really quite new this type of work. And, quite quickly
by bluenose69 5y ago
This article starts with naive code that is unlikely to be written by working scientists unless they are really quite new this type of work.
And, quite quickly, the article reaches a level of detail that might not engage the initial readers.
As a scientist with several decades of programming experience, it seems that those who write this sort of naive code are at an early stage of learning, and they might be better off learning Julia, which offers high performance even if written in a naive style. Granted, Python has superior (formal and informal) documentation, and it's error message are a lot easier to understand than those spewed by Julia. But it is quite freeing to be able to express things in a manner that is closer to mathematical notation, without paying a high performance cost. And, if the task really requires it, Julia will let you tune things to Fortran-level speeds (and sometimes better ... but that's another story).
- cjalmeida 5y agoCame here to say the same thing. With multiple dispatch and JIT compilation, you’ll go a long way in Julia with the naive version of the code.