A JIT compiler 'cyjit' using cython code as a backend

1989lzhh 1989lzhh at gmail.com
Wed Jun 11 20:13:57 EDT 2014


> I'm writing a JIT compiler named cyjit using cython code as a backend. It designed primarily reference numba.jit. the jitted python function will be converted to cython code then compiled to c extension.
> Use decorate to specify compiled function.

> for example:
> from cyjit import jit
> @ jit ('int (int, int)')
> def add (a, b):
> return a + b
> add (1,2) # compiled
> 
> @ jit ('int (int, int)',
> locals ='' '
> int c
> '' ')
> def add1 (a, b):
> c = add (a, b) # fast invoked
> return c
> add1 (1,2)
> 
> Currently cyjit does not support type defer, the local variables can be defined manually using C syntax.
> Jit compilation process is done inside jit decorate. I am planing to
> move compilation process into function's runtime to achieve overload like numba.jit.

> Currently cyjit supports compilation cache, the compilation will happen at the first run, it will take longer time. When you run it again, it will load the compiled extension directly. 
> 
> Welcome to fork, pull, and suggestions.
> 
> https://github.com/liuzhenhai/cyjit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140612/cc3a6f71/attachment.html>


More information about the Python-list mailing list