|
|
|
|
|
by arc776
2071 days ago
|
|
Just want to say thanks for these links, very interesting so far. A point made in the video that seems to highlight the issue: > Just adding two numbers requires 400 lines of code. In compiled languages, this is one instruction! Think about the cache thrashing and memory loading involved in this one operation too. How can this possibly be fixed? Python is a great language, but I don't know if it can ever be high performance on its own. |
|
FWIW, here's the relevant dispatch code in Python's ceval.c where you see it uses a very generic dispatching at that level, which eventually, deeper down, gets down to the "oh, it's an integer!"
Python code can be made more high performance if there's some way to tell the implementation the types, either explicitly or by inference or tracing. That's how several of those listed projects get their performance.