Live data from Hacker News

Pyjion – A Python JIT Compiler

trypyjion.com

11–20 of 126 posts

Re: Pyjion – A Python JIT Compiler

#11
post #8

Is this a modern version of Psyco? http://psyco.sourceforge.net/

From FAQ[1]:

> Psyco was a module that monkeypatched CPython to add a custom JIT compiler. Pyjion wants to introduce a proper C API for adding a JIT compiler to CPython instead of monkeypatching it. It should be noted the creator of Psyco went on to be one of the co-founders of PyPy.

[1] https://github.com/tonybaloney/pyjion#psyco

Re: Pyjion – A Python JIT Compiler

#13
post #4

This is the first time I've learned of this. How it compares to PyPy [1]: > PyPy is an implementation of Python with its own JIT. The biggest difference compared to Pyjion is that PyPy doesn't support all C extension modules without modification unless they use CFFI or work with the select subset of CPython's C API that PyPy does support. Pyjion also aims to support many JIT compilers while PyPy only supports their c…

Isn't this what the GraalVM [1] guys are also trying to do? Seems like today the competition is between who is more polyglot than the other, JVM, CLR or WASM.

[1] https://github.com/oracle/graalpython

Re: Pyjion – A Python JIT Compiler

#15
> Some benchmarks have a slow max/mean value because the time includes JIT-compiling large libraries like Pandas.

So why do not they warm the JIT up first? Moreover the graph does not contain any notion of mean/max values at all. Any idea where I can see a more comprehensive benchmark?

Re: Pyjion – A Python JIT Compiler

#16
The overall speed-up factor (calculated from the numbers in the Benchmarks diagram, geomean of factors) is 1.6, which is much less than the factor 4 achieved with PyPy (or the even higher factor claimed by Graal Python). CLI is not very well suited for dynamic languages; as far as I remember the results presented here correspond with Iron Python, which is to be expected based on the proposed concept.

EDIT: Yes, indeed pretty much the same factor, see e.g. https://web.archive.org/web/20090324020143/http://www.codepl...

Re: Pyjion – A Python JIT Compiler

#18
post #4

This is the first time I've learned of this. How it compares to PyPy [1]: > PyPy is an implementation of Python with its own JIT. The biggest difference compared to Pyjion is that PyPy doesn't support all C extension modules without modification unless they use CFFI or work with the select subset of CPython's C API that PyPy does support. Pyjion also aims to support many JIT compilers while PyPy only supports their c…

Isn't this what the GraalVM [1] guys are also trying to do? Seems like today the competition is between who is more polyglot than the other, JVM, CLR or WASM. [1] https://github.com/oracle/graalpython

A big difference is the Pyjion generates .NET compiler IR manually, while GraalVM generates Graal compiler IR automatically through partial evaluation of a declarative specification of an interpreter specialised to the program (the first Futamura Projection.) In my opinion that's far more powerful in terms of removing abstraction. But Pyjion also seems like a very cool project.

Re: Pyjion – A Python JIT Compiler

#20

Why is there so little mention of https://cython.org/ ? It's very fast, it compiles to C code, then compiles the C code with a normal compiler.

My understanding is that Cython does not run unmodified standard Python code.

It can run most unmodified Python code, but it needs types for the big speedups.
Post reply on HN