Talk On Making Python (Usefully) Faster

Presented by Damien Diederen in Scientific Applications 2009 on 2009/07/25 from 11:30 to 12:15
This talk will present a number of strategies used by the implementers of Smalltalk, Self, and more recently JavaScript virtual machines to accelerate dynamic languages, and show how they can be applied to the standard Python interpreter while retaining full backwards compatibility with existing C extensions.

We will demonstrate and discuss the various ways a dynamic recompiler and optimizer we implemented for Intel/AMD x86-64 processors can complement powerful abstractions such as NumPy and compilers such as Pyrex/Cython to eliminate even more of the interpretation and memory allocation overhead. This compiler has been integrated with CPython 2.6 and 3.1, and already yield speedups of 2 to 6x on most compute-intensive code, with more to come.

What makes our approach unique is that the dynamic language acceleration kernel, CrossTwine Linker, is fully language agnostic: policy-based design is used to combine generic, language-specific and ad-hoc elements for each particular scenario, while retaining the benefits of economies of scale in compiler development.

The modified CPython interpreters can be downloaded free of charge from