News for hackers. Stuff that matters.
Re:Faster Python calculations with Numba by synparb on Friday February 18, 2022 @11:06PM (#30394345)
I use numba quite a bit at work and it's fantastic. I recently, however, did a comparison between numba, cython, pythran and rust (ndarray) for a toy problem, and it yielded some interesting results:

https://github.com/synapticarbors/ndarray_comparison/blob/ma...

Most surprising among them was how fast pythran was with little more effort than is required of numba (still required an aot compilation step with a setup.py, but minimal changes in the code). All of the usual caveats should be applied to a simple benchmark like this.

Re:Faster Python calculations with Numba by cycomanic on Saturday February 19, 2022 @03:16AM (#30395329)
I didn't see your comment until I wrote mine, yes I did the same comparison and pythran really is amazing. One of the great things is that it also runs as reasonably fast regular python code (as you can just leave most numpy functions in place), which makes debugging and prototyping so much easier.