pylibjit: A JIT Compiler Library for Python.

Gergö Barany · 2014

Abstract: We present pylibjit, a Python library for generating machine code at load time or run time. The library can be used for dynamic code generation, although it is mainly aimed at optimizing compilation of existing Python function definitions. Python functions can be compiled by simply annotating them with a decorator specifying data types. The pylibjit compiler takes advantage of this type information to perform unboxing, omit dynamic type checks, and avoid unnecessary reference counting operations. We discuss pylibjit’s compilation schemes based on an abstract syntax tree or Python’s internal bytecode representation, and present benchmark results. For simple numerical programs, we achieve speedups of up to 50 × over standard interpreted Python. 1

Read the paper · More papers on PaperTik