[Python-Dev] Pyston: a Python JIT on LLVM

Sturla Molden sturla.molden at gmail.com
Sat Apr 5 23:15:28 CEST 2014


Kevin Modzelewski <kmod at dropbox.com> wrote:
> Using optional type annotations is a really promising strategy and may
> eventually be added to Pyston, but our primary target right now is
> unmodified and untyped Python code

What I meant to say is that Numba already has done the boiler-plate coding.
Even if you use no type annotations, it is already a Python bytecode
JIT-compiler based on LLVM that is hooked up with CPython. You might have
to add optimizations to it, yes, but it has the skeleton for a CPython
LLVM-based JIT compiler set up and running.

If you provide no type annotations, Numba's autojit decorator will do a
data-guided specialization. The types will be inferred from running the
code through the CPython interpreter, and then Numba will generate a
specialization. This is somewhat similar to the information-gathering that
GCC does when we run profile-guided optimizations.

Sturla



More information about the Python-Dev mailing list