|
|
|
|
|
by tadlan
3821 days ago
|
|
Numba would still be faster. It would fuse away any intermediates in the code and remove any Overhead to the compiled code. also have the option of devecting to loops. both of which are generally faster than vectorized jumpy code. |
|
There is still a lot of Python code that the Numba-to-LLVM compiler cannot handle. Yes, it is true that Numba can do a decent job of removing CPython virtual machine overhead, even for functions in which you statically type the arguments merely as 'pyobject' -- but not universally.
And there are also a ton of super basic things, for example creating a new array inside the body of a function when using Numba in 'nopython' mode [1], that Numba doesn't handle. These things will improve over time, but they may not improve quickly enough for a given use case, and the D language and this ndarray implementation may be a fair competitor to Numba in the short-to-medium term (and could even be superior in the long run, who knows).
A fairer alternative would be comparing with the use of Cython, which for my money still hands down beats anything like D or Nim/Pymod for performance enhancement without sacrificing pleasantness of design and development.
Though, of course, none of this stuff holds a candle to Haskell :)
[1] < http://stackoverflow.com/questions/30427081/creating-numpy-a... >