![](https://secure.gravatar.com/avatar/550b5f672c119c55882aa0ce14890089.jpg?s=120&d=mm&r=g)
On Thu, Jul 04, 2019 at 09:07:22AM +0200, Juan Luis Cano Rodríguez wrote:
On 7/3/19 10:19 PM, Dieter Werthmüller wrote:
I think it was Ralf who said that it would be nice if one could achieve with a simple decorator a speed-up with numba - if it is installed, and otherwise just keep the status quo.
This is what we do in poliastro for example:
https://github.com/poliastro/poliastro/blob/v0.12.0/src/poliastro/core/_jit....
Also works on PyPy, which in theory should not need numba:
install_requires = ... numba>=0.39 ; implementation_name=='cpython'
(a bit of self-advertisement here) IMHO, this is where Pythran[0] shines: the input code is pure, high-level Python. And unlike numba, there's no need to explicit loop over arrays, numpy operations are supported so the performance loss when falling back to python is acceptable. Just a maintainer opinion though :-) ++ Serge [0] https://github.com/serge-sans-paille/pythran