4 ms·
> There is so much pointer indirection internal to CPython. This cannot be overstated. Really, truly, forget everything you know about cache locality when doin
by zbentley 3y ago
> There is so much pointer indirection internal to CPython.
This cannot be overstated. Really, truly, forget everything you know about cache locality when doing even basic "for-each: add numbers together"-type things in Python.
That's not an indictment; such indirection is par for the course for scripting languages, and enables a lot of features and dynamism. Additionally, the cost of that indirection may go down over time thanks to interpreter optimizations like the JIT: https://tonybaloney.github.io/posts/python-gets-a-jit.html https://tonybaloney.github.io/posts/python-gets-a-jit.html