Re:Faster Python calculations with Numba
by cycomanic on Saturday February 19, 2022 @05:57AM
(#30396130)
I have written quite a bit of cython code as well and at least the last time I looked cython was much better documented than numba (it has been a couple of years though so things might have improved on the numba side), and I would agree with the previous poster is generally quite well documented.
Re:Faster Python calculations with Numba
by korijn on Saturday February 19, 2022 @11:30AM
(#30398298)
Also I am specifically referring to the documentation on creating ahead of time compiled packages using Numba vs Cython, but perhaps that was unclear.
Re:Faster Python calculations with Numba
by VHRanger on Saturday February 19, 2022 @12:06PM
(#30398571)
FWIW Numba's JIT caches the compiled function as long as you don't call it again with different type signatures (eg. int32[] vs int64[])
I've succesfully deployed numba code in an AWS lambda for instance -- llvmlite takes a lot of your 250mb package budget, but once the lambda is "warm" the jit lag isn't an issue.
That said, if you absolutely want AOT you'll have to use Cython or some horrible hack dumping the compiled function binary.
Re:Faster Python calculations with Numba
by korijn on Saturday February 19, 2022 @01:46PM
(#30399402)
Exactly!
Re:Faster Python calculations with Numba
by A-Train on Saturday February 19, 2022 @01:12PM
(#30399122)
You realize that Scikit-learn is written mostly in Cython (where high performance is needed)? It is a part of the most influential ML library in existence.
"Fits very few use cases" LOL okay without numba there's no UMAP and HDBScan and those are pretty popular and important libraries that come to mind just off the top of my head...
Also, claiming Cython is well documented also gets a huge LOL from me as someone whose actually written a bit of Cython.