Python and the need for speed

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Apr 18 19:19:21 EDT 2017


bartc wrote:
> But another problem was, there /are/ no simple byte-codes in CPython!

Yes, that's the crux of the whole thing. It's the reason it's
so hard to compile Python to anything that runs significantly
faster than interpreted code.

> Another optimisation for something 
> like ADD, was to to check for very common types such as INT, and deal 
> with those locally.

And then you're on the path to writing a JIT compiler. If you
can identify such cases, you might as well generate machine
code for them.

-- 
Greg



More information about the Python-list mailing list