Re:Pythran – a compiler for Python scientific kernels – release
by chenzhekl on Thursday November 07, 2019 @03:32AM
(#21471479)
How does it compare to Numba and Cython?
[ Parent
| on HN ]
Re:Pythran – a compiler for Python scientific kernels – release
by mattip on Thursday November 07, 2019 @06:05AM
(#21472163)
Here is a nice comparison https://flothesof.github.io/optimizing-python-code-numpy-cyt...
Tl;dr: pythran is very similar to numba but blazingly fast on cpu
Re:Pythran – a compiler for Python scientific kernels – release
by mlthoughts2018 on Thursday November 07, 2019 @06:54AM
(#21472345)
The Cython example in that link is actually not a fair comparison, since it still forces the numpy ndarray type in the signature.
Instead it should use typed memoryviews [0], which are faster and can avoid more cases that will rely on the GIL accidentally (such as when an ndarray has to be treated as a Python object).
[0]: https://cython.readthedocs.io/en/latest/src/userguide/memory...