Hacker News new | past | comments | ask | show | jobs | submit login

As you note, the last benchmark does precisely what you suggest, comparing completely vectorized code that just calls BLAS. This is a really uninteresting benchmark, however, since everyone is close to C++ (although NumPy, Octave and R still introduce 20%, 69% and 165% overhead, respectively) — because you're really just comparing C++ against C++.

One of the key concepts behind Julia is that not only the end-user, but also the numerical library writer, should benefit from using a high-level language. In Julia, almost all of the library code is in Julia, and it's as fast as the library code written for R, Matlab or NumPy in C. There are also a lot of situations where vectorized code is either awkward or inefficient — especially in terms of creating a lot of unnecessary temporary arrays. Languages where the high-level language is slow force you to do everything vectorized — in Julia, you're not forced to do that. If you want to write a C-style scalar loop, you can and it will be fast (and you don't even need type annotations to make it fast, as shown by the benchmarks).

V8 is really impressively fast, but JavaScript as a language is not very well suited to scientific or technical computing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: