3 ms·
> CPython for-loops are slow. PyPy for-loops are not slow. I fear you might have missed the point of that paragraph. The point was that multiple reasons contr
by jboy 11y ago
> CPython for-loops are slow. PyPy for-loops are not slow.
I fear you might have missed the point of that paragraph. The point was that multiple reasons contributed to the need for Numpy, so now it exists and is widely used by those who are serious about their scientific computing. The vast majority of those reasons are still valid, even though PyPy speeds up some general-purpose programming tasks in Python.
"A loop that just counts" is not anywhere near a substitute for Numpy. Nor does a 25x speed increase in a particular operation (from CPython to PyPy) hold a candle to the number-crunching speedups provided by algorithm-optimized, code-optimized (often to the point of targeting specific vector instruction sets like SSEx) special-purpose numeric libraries.