A Google-sponsored attempt to add LLVM-based JIT compilation to CPython and make it 5x faster. The project fell short of its performance goals and was abandoned in 2011 without being merged, but influenced future Python performance work.
Unladen Swallow integrated LLVM as a JIT compiler backend for CPython's bytecode interpreter. It attempted to identify hot functions via profiling, compile their bytecode to LLVM IR, optimize it through LLVM's optimization passes, and emit native x86 machine code. The approach suffered from high warm-up costs and the fundamental difficulty of optimizing dynamically-typed Python code through a framework designed for statically-typed languages.
In early 2009, three Google engineers — Collin Winter, Jeffrey Yasskin, and Thomas Wouters — launched Unladen Swallow, a project to make CPython dramatically faster. The name was a Monty Python reference (naturally), and the ambition was enormous: a 5x speedup for CPython by integrating LLVM-based just-in-time compilation into the standard interpreter. Google's motivation was practical — they ran massive amounts of Python code internally and would benefit enormously from a faster runtime.
The initial Q1 2009 release set modest expectations: a 25-35% speedup through incremental improvements. The plan was to progressively add JIT compilation for hot code paths, replacing CPython's simple bytecode interpreter with compiled native code for frequently-executed functions. If successful, the work would be merged into CPython 3.x, becoming the standard implementation.
PEP 3146 was written to formalize the merge plan, proposing that Unladen Swallow's LLVM-based approach would be integrated into CPython's mainline. But the project ran into serious technical challenges. LLVM's compilation overhead was significant — JIT-compiling Python bytecode to native code often took longer than simply interpreting it, especially for short-running scripts. The warm-up penalty was too high for many Python workloads, and the overall speedup was far below the 5x target.
By 2010, the project had largely stalled. Collin Winter gave talks honestly acknowledging that Unladen Swallow had failed to meet its goals, citing LLVM's overhead and the fundamental difficulty of optimizing a dynamically-typed language. Some improvements — notably to the cPickle module — were cherry-picked into CPython, but the JIT itself was never merged. Development officially ceased in 2011.
Unladen Swallow's failure was a productive one. It demonstrated concretely why Python JIT compilation is hard, and its lessons informed later projects like PyPy (which used a different JIT strategy and achieved the speedups Unladen Swallow couldn't) and eventually CPython's own experimental JIT work in Python 3.13+.
Unladen Swallow announced as a Google-sponsored CPython branch with LLVM-based JIT
Q1 2009 release achieves modest 25-35% speedup on some benchmarks
PEP 3146 proposed to merge Unladen Swallow into CPython mainline
Project stalls as LLVM compilation overhead proves too high for Python workloads
PEP 3146 withdrawn; merge into CPython abandoned
Development officially ceases; some minor improvements cherry-picked into CPython
Unladen Swallow's most important contribution was demonstrating what doesn't work for Python JIT compilation — specifically, that bolting LLVM onto CPython's existing bytecode interpreter doesn't yield the expected gains. This negative result was valuable: it steered the Python community toward alternative approaches like PyPy's meta-tracing JIT and eventually CPython's own copy-and-patch JIT in Python 3.13.
The project also showed that even Google's resources can't overcome fundamental architectural mismatches. Sometimes the right answer isn't to optimize the existing implementation but to rethink the approach entirely.