Pycon: Unladen-Swallow

by jesse in ,


Tree-Swallow.jpgSo, by now some particular set of people (mainly those at the VM-Summit and twitter) have heard about unladen-swallow, a new project out of "the Google" which is working on providing some serious speed increases to the CPython interpreter.

This is being worked on by Collin Winter, Jeffery Yasskin and Thomas Wouters - it's a branch of CPython: Not a Fork. Some of the improvements could possibly be rapidly integrated to python-trunk, some of them (such as using LLVM) are a longer road obviously, but given the people involved, and others in that arena, I could easily see this supplanting the current interpreter quickly.

But I'm biased, because they sped up CPickle (which is what multiprocessing uses for sharing data between processes). Oh, and they include psyco (port to 64 bit ok please).

The goals are nice, quoting a few choice ones from the project plan:

We want to make Python faster, but we also want to make it easy for large, well-established applications to switch to Unladen Swallow.

  1. Produce a version of Python at least 5x faster than CPython.
  2. Python application performance should be stable.
  3. Maintain source-level compatibility with CPython applications.
  4. Maintain source-level compatibility with CPython extension modules.
  5. We do not want to maintain a Python implementation forever; we view our work as a branch, not a fork.

And (from 2009 Q3 Goals):

In addition, we intend to remove the GIL and fix the state of multithreading in Python. We believe this is possible through the implementation of a more sophisticated GC system, something like IBM's Recycler (Bacon et al, 2001).

Our long-term goal is to make Python fast enough to start moving performance-important types and functions from C back to Python.

The great thing is: They have a working implementation right now. Yessir, it's not vapor! Hooray!

I've got it down, compiled and I'm futzing around with it now, yes it works. Unfortunately testing it I found a bug in multiprocessing (not unladen). Damn!