4 ms·
He missed a critical option: you can write those loops in python and JIT them to C fast LLVM with numba: https://github.com/numba/numba https://github.com/numba
by Lofkin 11y ago
He missed a critical option: you can write those loops in python and JIT them to C fast LLVM with numba: https://github.com/numba/numba https://github.com/numba/numba
- jfpuget 11y agoI tried numba. It isn't helping here. Yes, I used @jit(nopython=True). It does not compile pandas code.
- Lofkin 11y agoTry converting to a numpy array, executing the operations and converting back to pandas. More details here: http://pandas.pydata.org/pandas-docs/version/0.16.2/enhancingperf.html?highlight=numba http://pandas.pydata.org/pandas-docs/version/0.16.2/enhancin... Also they recently added support for array expressions and allocation so you should upgrade if you haven't already.