by heurist · 13y ago · 0 comments
one note - this code could be better optimized by the compiler if you broke everything down into functions, especially the nested for loops (according to the optimization section of the docs).
x = 1
f(x)
x = "foobar"
f(x)
then each call to f will be optimized for the current type of x. On the other hand, if your code is type stable, as it appears to be here, it will be properly optimized in place by the Julia JIT compiler and there's no need split it into separate functions.