python jit_全球首个也是唯一一个与CPython兼容的Python JIT

The developement of this project is suspended due to the complexity of managing multi-language dependencies and Python's verbose functional style codebase. We're now working on creating a static compiled programming language RemuLang targeting CPython bytecode, and after the available version of RemuLang released we'll resume the development of Restrain-JIT.

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f487970696e672d57686174277325433225413025323243507974686f6e254332254130436f6d70617469626c652532322d4f72616e67652e7376673f7374796c653d666c6174

Python Restrain JIT

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174696f6e2d2545382542352539452545352538412541392d5465616c2e7376673f7374796c653d666c617468747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374617274254332254130446576656c2d2545352542432538302545352538462539312545352538462538322545342542382538452545362538432538372545352538442539372d507572706c652e7376673f7374796c653d666c6174

The first and yet the only "CPython compatible" Python JIT, over the world.

This comes with my talk on PyConChina 2019.

Restrain JIT: The Cython Back End

For the previous suspending Julia back end, check the branch julia-backend.

Cython is a widely used Python to C compiler, although it's lack of optimizations, it compiles fast, which greatly reduces the annoyance of JIT overhead.

Currently the Cython back end works for many fundamental Python constructs. The constructs haven't suppported yet are exceptions(but you can wrap it as a function) and closures(ready to support today).

The Cython back end did much more on the compilation stuffs, like Control Flow Analysis, many kinds of abstract interpretations, SSA conversions and corresponding passes. One of the most awesome pass is the Phi-Node analysis pass, which converts the semantics of Stack Virtual Machine to a Register-based Virtual Machine, and generates Phi nodes: phi_node_analysis

Besides, this is still based on Python bytecode, so Restrain JIT on Cython is still free of hack and available in any case.

The developement of Cython back end is a joy. Yes, debugging is so fast that I can make faster developement iterations, and no need to wait half a minute when I want to re-run codes :)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值