DuckLogic - A JIT for Python

The standard Python interpreter is slow. It is anywhere between 10-100x slower than language implementations with a good JIT, like Java's Hotspot & Javascript's V8 (see third-party benchmarks here).

The only major JIT for Python as of this writing is PyPy. Unfortunately it is incompatible with the native C API extensions (numpy, scipy) and still isn't quite as good as V8 and Javascript VMs.

I've built a prototype JIT compiler modeled adter V8, Hotspot, and JavascriptCore which performs "speculations" or gueses based on profiling data collected in the interpreter. These guesses at type information are able to eliminate most of the overhead of dynamic typing, resulting in large performance gains.

One of the more difficult parts of this project is remaining compatible with Python's CAPI (see here), which is very poorly encapsulated :(

I would like to get the source code into a better state before I release it. Hopefully this will happen soon ™


Techcable (lead developer)