3 ms·
> Which implementation are you using The only one in which all documented (and not) Python stuff works, and all Python packages can be used? There is only one
by kazinator 4y ago
> Which implementation are you using
The only one in which all documented (and not) Python stuff works, and all Python packages can be used?
There is only one Python for practical purposes.
> Modern CPUs are pretty good at executing bytecode-based languages, as there's usually a main loop that fits in cache.
When everything fits in the cache, bytecode loses most. The more you saddle code with uncached memory accesses, the less it matters whether it's bytecode or machine code. This is just Amdahl's Law.
The best performing Python code will be that which spends very few cycles in any byte code loop, and just lets the C routines in Python do all the work.
The interesting possiblity is that a bytecode program (and it's interpreter) together fit into the instruction and data cache. Whereas the equivalent machine code program blows the instruction cache. I'm not sure that this scenario is possible with Python in such a way that it actually makes it faster.