| Looks good, but I actually love that Julia gets at least the same performance right out of the box, with full interoperability and the great multiple dispatch logic. Would be interesting to run your optimized code against the Julia optimized code that was linked to in this thread.
Or run a Julia GPU benchmark as well. As for loops versus vectorization - I personally am used to vectorized code as it has always been a requirement. Sometimes it makes sense to use (e.g. Matrix Algebra stuff). On the other hand, I have also been in many situations where I could not vectorize my code. More code than I'm happy to admit includes list or dict comprehensions or even loops. Sure, not all performance critical. Nevertheless, the prospect of performance no matter what is pretty exciting. Finally, threading and multiprocessing in python is a headache compared to Julia imo.
Sometimes I just miss the good ol' "parfor" from Matlab. All in all, Julia is a really appealing value proposition to people doing numeric computing. |
Curiously, as much as I love the Julia language, I cannot stand multiple dispatch. I find it extremely confusing, ugly, and downright disturbing. Why would you ever want two different functions with the same name? And if this is good, why stop here? Why not two different variables with the same name but different types? Depending on the context where they are used, the language could pick one or the other.