Hacker News new | ask | show | jobs
by marcher 6369 days ago
The PyPy folks are working on a JIT, apparently with great speedups. They've been detailing their work on their blog: http://morepypy.blogspot.com/

Also, are JavaScript and Python really that dissimilar? Everyone's working on tracing JITs for JavaScript now, with great results.

2 comments

Take a look at the PyPy FAQ. They're using annotations, type inference assumptions, and so on. PyPy seems to be focused on a Jit-able subset of Python. It's not a project that can one day be transparently included in the new Python release.

JavaScript and Python are not that dissimilar. So we see similar results with JavaScript. People want performance, so a lot of projects are started where people attempt to JIT JavaScript - but in the 14 or so years of JS's existence JavaScript is still several orders of magnitude slower than less dynamic languages. Java and C# have never been as slow as JavaScript is today. Will JIT-ing JavaScript help? Sure. But -great- results? I wouldn't go that far.

Don't forget psyco's JIT which gives some impressive performance gains for a lot of different code. We use it while embedding Python in Counter-Strike Source and it performs admirably.
Someone needs to upgrade pyscho for 64 bit IIRC
No, PyPy is a full Python implementation that uses program analysis to identify and JIT the JITable parts of the code.

The FAQ says that PyPy is a drop-in replacement for CPython unless you depend on a CPython extension module. http://codespeak.net/pypy/dist/pypy/doc/faq.html#is-pypy-a-d...

The drop in replacement is slower than CPython. Likely to change in the future, but still.
My impression is that Python's interpreter is pretty good, so it wouldn't benefit as much from JITing.

That being said, it would certainly help, and the same library used in TraceMonkey (nanojit) could probably be used in Python.