Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73191 > unrolled thread
| Started by | 1989lzhh <1989lzhh@gmail.com> |
|---|---|
| First post | 2014-06-12 08:13 +0800 |
| Last post | 2014-06-12 08:13 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
A JIT compiler 'cyjit' using cython code as a backend 1989lzhh <1989lzhh@gmail.com> - 2014-06-12 08:13 +0800
| From | 1989lzhh <1989lzhh@gmail.com> |
|---|---|
| Date | 2014-06-12 08:13 +0800 |
| Subject | A JIT compiler 'cyjit' using cython code as a backend |
| Message-ID | <mailman.11022.1402532053.18130.python-list@python.org> |
[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 top | Article view | comp.lang.python
csiph-web