开发者

Strengths and weaknesses of JIT compilers for Python

开发者 https://www.devze.com 2023-01-01 05:47 出处:网络
I\'m currently aware of the follo开发者_Python百科wing Python JIT compilers: Psyco, PyPy and Unladen Swallow.

I'm currently aware of the follo开发者_Python百科wing Python JIT compilers: Psyco, PyPy and Unladen Swallow.

Basically, I'd like to ask for your personal experiences on the strengths and weaknesses of these compilers - and if there are any others worth looking into.

Thanks in advance,

Az


Christian Perone has an excellent article from just a few days ago where he claims (with supporting benchmark data) that PyPy is now the fastest, running the benchmark in 145 seconds vs 300 for Unladen Swallow and 374 for CPython (Psyco doesn't help, actually PsycoV2 slows the benchmark down to 434 seconds), 557 for Jython -- see the URL I just gave for all details.

Of course, you'd need to confirm this on a wide range of benchmarks, but it sure seems credible and very interesting. Pypy has the largest team working on it (and has had for many years, including several years with generous monetary support from European Union research grants), which is why it's quite credible that it's now "fully in gear" and ready for prime time!-)


Some other tools you might investigate to speed up python are

  • Cython, which requires type specification of all variables in the relevant method and then statically compiles the method
  • Numba, which requires LLVM but is JIT (methods must be decorated with argument types for compilation to occur).
0

精彩评论

暂无评论...
验证码 换一张
取 消