Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73191

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

Subject A JIT compiler 'cyjit' using cython code as a backend
From 1989lzhh <1989lzhh@gmail.com>
Date 2014-06-12 08:13 +0800
Newsgroups comp.lang.python
Message-ID <mailman.11022.1402532053.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

> 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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

A JIT compiler 'cyjit' using cython code as a backend 1989lzhh <1989lzhh@gmail.com> - 2014-06-12 08:13 +0800

csiph-web