4 ms·
I've seen some very impressive Julia libraries that perform almost at the level of C code, so I'm not sure if the gap that Julia needs to fill is that large. A
by zzleeper 11y ago
I've seen some very impressive Julia libraries that perform almost at the level of C code, so I'm not sure if the gap that Julia needs to fill is that large.
Also, a quick question: which one is preferred nowadays, Cython or Numba?
- dagw 11y agoCython is much more mature, works on basically all python code and basically never leads to slowdowns compared to pure python. Unfortunately non of that can really be said about Numba. That being said, when Numba works it's great and is much easier to work with than cython.
- synparb 11y agoI'll echo @dagw's comments. Cython has been rock solid for me for a long time and it is my go to for any sort of external c/c++ library interfacing. That said, I find myself using Numba more and more in the places that I can as Numba has gotten significantly better in the last 6 months or so. It's still not a complete replacement for cython (and I don't think it ever will or intends to be), but for hot spot numerical calculations it's really nice since it's much faster to test things out since it doesn't involve the boiler plate required by Cython, and doesn't require the (often slow) compilation times. In Numba 0.21.0, on-disk caching of jit'd code was also introduced, which was one of the major sticking points for us to put Numba into production in areas where we needed faster start-up times. Before we could really only use Cython because we required the start-up times available only from AOT compilation. That all said, Numba has been a bit buggy for me at times, although these get squashed pretty quickly. I've only found a single bug in Cython in all of the years I've been using it, and it's amazing how quickly Robert Bradshaw or Stefan Behnel respond and fix things considering Cython is not their full time job.
- shoyer 11y agoIt really depends on your use case. Cython is more flexible and suitable for libraries, but Numba is easier to write. I elaborated on this in a recent blog post: http://eng.climate.com/2015/04/09/numba-vs-cython-how-to-choose/ http://eng.climate.com/2015/04/09/numba-vs-cython-how-to-cho...
- andreasvc 11y agoThe gap that Julia has to fill in terms of library ecosystem is definitely large. Numba is specific to numeric/array-oriented code. Cython is general-purpose and can also be used to implement e.g. datastructures.
- tadlan 11y agoNumba has list, Named tuples, and is working on define your own jit classes.