3 ms·
My guess is that since Numpy with CPython is all about calling into optimized native-code kernels, there's not much PyPy can do to win in big arrays. With small
by zurn 11y ago
My guess is that since Numpy with CPython is all about calling into optimized native-code kernels, there's not much PyPy can do to win in big arrays. With small vectors the C FFI overhead would dominate on CPython and PyPy has an advantage. This would be more apparent if they provided also graphs with absolute numbers and not just speedups relative to classic Numpy.
- leecb 11y agoThey have decided to rewrite the C parts of NumPy in RPython, essentially working towards a pure Python version of Numpy. There are a lot more details sprinkled across several pages: http://morepypy.blogspot.mx/2013/11/numpy-status-update.html http://morepypy.blogspot.mx/2013/11/numpy-status-update.html http://pypy.org/numpydonate.html http://pypy.org/numpydonate.html
- fulafel 11y agoYes, so PyPy can win on small arrays because there is no per-call C FFI overhead in calling into RPython-Numpy. The smaller the operations, the greater the win over CPython.