Hacker News new | ask | show | jobs
by shadowmint 3643 days ago
Python is made faster by optimizing the C implementation of it's opcodes, not by doing any optimization at a higher level?

Really?

Sounds more like; It's more convenient for us to try to optimize cpython at the opcode level because its technically difficult to apply JIT techniques at a higher level because of the way cpython is implemented.

    Pyston's performance improvements come from speeding up the C code, not the Python code.

    When people say "why doesn't Pyston use [insert favorite JIT technique here]", my question
    is whether that technique would help speed up C code.  I think this is the most fundamental
    misconception about Python performance: we spend our energy trying to JIT C code, not Python 
    code.  

    This is also why I am not very interested in running Python on pre-existing VMs, since that 
    will only exacerbate the problem in order to fix something that isn't really broken.
...really?

All I can fathom is that this project is about trying to take the existing cpython implementation and make it faster by applying various magical hacks at a very low level, rather than trying to address any of the more difficult problems about why the cpython runtime is slow.

This is exactly the opposite approach from pypy (ie. reimplement cpython in a way which is fundamentally better); and it certainly seems to be yielding some interesting results.

...but I think I'm a little skeptical that its the only solution.

It just happens to be the solution they've decided to pursue.