3 ms·
It's worth noting that one of the main pain points mention of Python was that it was 2-100 times slower (vs 1-2x slower for Lisp). The slowest elements of Pytho
by icc97 8y ago
It's worth noting that one of the main pain points mention of Python was that it was 2-100 times slower (vs 1-2x slower for Lisp). The slowest elements of Python compared to C++ were matrix multiplication (278x slower), array access (141x slower) and heapsort (84x slower). NumPy solves the two slowest, although I can't find an obvious contender for the sorting.
- enitihas 8y agoNumpy does sorting too.
- masklinn 8y ago> heapsort (84x slower) […] I can't find an obvious contender for the sorting. Use the built-in sort instead of hand-rolling your own? The built-in sort is not a heapsort and though I don't know what it was before the 2.3 "timsort" implementation, the essay mentions Python 2.7 so I would assume it's not talking about the old built-in sort either.
- hellofunk 8y agoThis article predates Python 2.7 by 10 years. The link to 2.7 was probably added or edited many years later.