Notice
This item was automatically migrated from a legacy system. It's data has not been checked and might not meet the quality criteria of the present system.
Barany, G. (2013). pylibjit: A JIT Compiler Library for Python. In 17. Kolloquium Programmiersprachen und Grundlagen der Programmierung (KPS 13) (p. 9). http://hdl.handle.net/20.500.12708/54696
We present pylibjit, a Python library for generating machine code at load time or run time. The library has two distinct modes of use: First, it aims to provide a high-level interface for generating code at run time. This is achieved by using language features such as operator overloading and Python's context managers and decorators.
Second, Python's reflection features allow us to access funct...
We present pylibjit, a Python library for generating machine code at load time or run time. The library has two distinct modes of use: First, it aims to provide a high-level interface for generating code at run time. This is achieved by using language features such as operator overloading and Python's context managers and decorators.
Second, Python's reflection features allow us to access functions' abstract syntax trees. pylibjit can make use of this to generate machine code for functions originally written in Python. Compiling a Python function can be as easy as attributing it with a decorator providing type information, without changing the function itself in any way. Such compiled functions are executed transparently within interpreted Python programs. This makes it convenient to develop applications in Python and then speed up only the hot spots using compilation.
The development of pylibjit is at a very early stage, but we can already present some working examples. For simple numeric programs, we achieve speedups of up to 50x over standard interpreted Python.