Every now and then someone posts a question asking about why Matlab/Python/C/Fortran is so much faster than Julia. The great community here is quickly to point out optimizations that can be used which result in a significant improvement to the performance of Julia.
Most of the time, the OP is referred to the tips in the manual, but some other times further optimizations using other packages are suggested (for example using
That had me wondering whether there exists a compilation of tips and best practices addressing the most common cases that people encounter. In addition to macros, perhaps also other types of optimizations like using
\ instead of
inv(), or using in-place operations, or using
StaticArrays where appropriate.
Does anyone know of any blog or tutorial does such comparison or suggests best practices? Maybe it would be good to maintain a document in GitHub so that people can suggest improvements, and also keep it up to date as new packages are released, or when things change between versions of Julia.
I think most researchers apart from engineering or CS are not experts in computation and simply code algorithms the way they think about them in math terms. They would be the target audience for such tips. I know that I for one would greatly appreciate such compilation.