JIT Compiler for CPython

From the article:

The initial benchmarks show something of a 2-9% performance improvement.

The basic issue is that it’s hard to efficiently compile Python code because the language semantics weren’t designed for this. There have been many attempts to JIT-compile Python, and some of them have been very sophisticated with impressive results (PyPy, Numba, Pythran, Pyston, …), but generally they have worked well only for a subset of the language. But Python is so widely used that even small speedups (or big speedups on a small subset) are worth the effort, and I wish them well.

It’s for the same reason that you can’t just slap a “Julia backend” underneath Python and expect to see any improvements — a compiler by itself isn’t enough, and Julia’s compiler (which is just ordinary LLVM) isn’t what makes Julia special. This is also a Julia FAQ.

See also many previous discussions — How hard would it be to implement Numpy.jl, i.e. Numpy in Julia?Python to Julia transpilerConvert Matlab Code to Julia 1.0 — as well as this blog post by @ChrisRackauckas.

20 Likes