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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <1989lzhh@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'compiler': 0.07; "subject:' ": 0.07; 'subject:code': 0.07; 'variables': 0.07; 'converted': 0.09; 'run,': 0.09; 'runtime': 0.09; 'subject:backend': 0.09; 'subject:using': 0.09; 'suggestions.': 0.09; 'url:github': 0.09; 'python': 0.11; 'def': 0.12; 'b):': 0.16; 'backend.': 0.16; 'extension.': 0.16; "function's": 0.16; 'import': 0.22; 'load': 0.23; 'compilation': 0.24; 'specify': 0.24; 'compiled': 0.26; 'extension': 0.26; 'defined': 0.27; 'to:2**1': 0.27; 'function': 0.29; 'primarily': 0.30; "i'm": 0.30; 'code': 0.31; 'run': 0.32; 'received:google.com': 0.35; 'add': 0.35; 'done': 0.36; 'charset :us-ascii': 0.36; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'manually': 0.60; 'first': 0.61; 'header:Message-Id:1': 0.63; 'happen': 0.63; 'decorate': 0.84; 'received:10.44': 0.84; 'directly.': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:content-type:message-id:date:to :content-transfer-encoding:mime-version; bh=JaL2Ne3MhHm3co9HQVh4RS53cpyPRrfJzeEjoDvQTVs=; b=HaQ3KQZGngSLnmHQabALh7ul33+wLk8TPw0q3+CnM1uYpi6PVnD5964AzztXiEI9xG t9sx2mle7WICmtatZdO/UBo5IWNHTQcXfey8izWiIOzh5AB4J/6+BGi0P5Bz5V3lHpPD T6Wcv+fvOQ0trfmLa33ug0/oiiI4AAEuZCkzXojQDZigsb1FeNA4I1JLO7OJ2qlWaalB hxWDXYTs1ptfiAKpLAYVfSdXOJZfNM9OV/1QG9+js1AOJVVwe8QLco+ULSt1dtKQsZHp TYN1zTm8epIuwqwZlF6EtZBW3qr8wJrNmc5SI4Jee/2YdBRWqemCRPDi7CUoy0I8B2XM MuXw==
X-Received by 10.66.66.72 with SMTP id d8mr17580196pat.8.1402532050143; Wed, 11 Jun 2014 17:14:10 -0700 (PDT)
Subject A JIT compiler 'cyjit' using cython code as a backend
From 1989lzhh <1989lzhh@gmail.com>
Content-Type multipart/alternative; boundary=Apple-Mail-3778C777-ED80-4F14-BB6E-E51F1041149E
X-Mailer iPhone Mail (11D201)
Date Thu, 12 Jun 2014 08:13:57 +0800
To cython-users@googlegroups.com, python_list <python-list@python.org>
Content-Transfer-Encoding 7bit
Mime-Version 1.0 (1.0)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11022.1402532053.18130.python-list@python.org> (permalink)
Lines 80
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1402532053 news.xs4all.nl 2882 [2001:888:2000:d::a6]:53006
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73191

Show key headers only | 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