4 ms·
> But it can show the relative speed of pure Python at purely computational tasks. But that's irrelevant if nobody uses "pure Python" for computational tasks.
by p-e-w 3y ago
> But it can show the relative speed of pure Python at purely computational tasks.
But that's irrelevant if nobody uses "pure Python" for computational tasks.
It's like asking "how well do these languages run on a Lisp machine from 1979?". It simply has no relevance to real-world considerations today.
- scotty79 3y agoEvery time you use a for loop, addition or multiplication operators, array indexing, assingment to numerical variable in Python, you are using exactly what is benchmarked in matmul.
- YetAnotherNick 3y agoEveryone uses pure python for purely computational tasks. numpy or pytorch has far too few operation to even count as all the computational task. e.g. most of the operations of pandas is written in pure python, and at times I found using specialised libraries could give 10x improvement but with blow to developer experience compared to python.
- mratsim 3y agoPandas/Numpy uses a lot of C and Scipy a lot of Fortran
- YetAnotherNick 3y agoNo one said they don't. Just there still are and always will be parts which are computationally heavy but written in python. e.g. pandas map is 300x slower than numpy map[1] for the same operation. But not everything could be vectorized and even if some complex function could be vectorized it will involve multiple passes over memory for the same array. [1]: https://www.exxactcorp.com/blog/Deep-Learning/how-to-speed-up-python-pandas-by-over-300x https://www.exxactcorp.com/blog/Deep-Learning/how-to-speed-u...
- gpderetta 3y agoNobody uses python for numerical tasks because it is atrociously slow at those tasks. This benchmark reiterates that.