« »

unladden swallow: a (potentially *much*) faster CPython

Thursday, 26 March 2009

Discussed a bit at the Python Language Summit at PyCon this morning: unladen-swallow is a Google project to do a lot of performance work on CPython's VM.

  • Currently have about 30% speed up.
  • Currently for Python 2 (2.4, I think).
  • Currently focused on Linux and Python 3, but committed to get patches back to the core (which implies Python 3 support). "This is a branch, not a fork."
  • Currently in use on Youtube (where most of the frontend is Python).

They are shooting for a 5x speedup. From the ProjectPlan:

Our long-term proposal is to replace CPython's custom virtual machine with a JIT built on top of LLVM, while leaving the rest of the Python runtime relatively intact. We have observed that Python applications spend a large portion of their time in the main eval loop. In particular, even relatively minor changes to VM components such as opcode dispatch have a significant effect on Python application performance. We believe that compiling Python to machine code via LLVM's JIT engine will deliver large performance benefits.

Jesse has a good write-up.

Tagged: python, programming, activestate


Comments

blog comments powered by Disqus