Live data from Hacker News

Pyjion – A Python JIT Compiler

trypyjion.com

41–50 of 126 posts

Re: Pyjion – A Python JIT Compiler

#41
post #38
post #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, indee…

Assuming zero compatibility problems and a simple drop in, I say 1.6 is pretty damn good from the start. Ruby' drop in YJIT barely managed ~20% speed up.

It's at 28.4% so let's make it barely managed ~30% :)

https://speed.yjit.org/

I'd give these guys some more time, it's a long project. They're working hard.

Re: Pyjion – A Python JIT Compiler

#42
post #36

Earlier quoted context omitted.

Well, if one wants stability and production releases, why would they be trying a new, experimental, JIT compiler for Python?

If it just required doing "pip install" then I'd try it to see how fast my test suite runs. But since it only works with Python 3.10 and .NET 6, realistically even just spending five minutes messing with it will require first waiting 18 months or whatever.

> waiting 18 months or whatever

Seems like a problem with however your system distributes software, not with Pyjion.

What does it take 18 months to do?

Re: Pyjion – A Python JIT Compiler

#43
post #23

I don't really see the benefit over Nuitka, or even a JIT like Numba. Can someone help?

Neither of those is a drop-in replacement for CPython.

It would be better to compare this project to, in addition to CPython: PyPy, GraalPython, Pyston, Cinder, Jython, and IronPython. As well as the now-inactive Psyco project, and possibly also Stackless Python.

Re: Pyjion – A Python JIT Compiler

#44
post #39

Earlier quoted context omitted.

If it just required doing "pip install" then I'd try it to see how fast my test suite runs. But since it only works with Python 3.10 and .NET 6, realistically even just spending five minutes messing with it will require first waiting 18 months or whatever.

Seems like it would take no more than 5 minutes to download and untar the listed dependencies, though. I don’t understand this attitude about experimentation.

I might mess up my computer!!

some people are helpless without their package manager and the maintainers that tell them what software that can run

Re: Pyjion – A Python JIT Compiler

#45
post #39

Earlier quoted context omitted.

If it just required doing "pip install" then I'd try it to see how fast my test suite runs. But since it only works with Python 3.10 and .NET 6, realistically even just spending five minutes messing with it will require first waiting 18 months or whatever.

Seems like it would take no more than 5 minutes to download and untar the listed dependencies, though. I don’t understand this attitude about experimentation.

You can even neatly do it in a docker container that you throw away after if you don't want to mess up anything locally.

Re: Pyjion – A Python JIT Compiler

#46

Earlier quoted context omitted.

If it just required doing "pip install" then I'd try it to see how fast my test suite runs. But since it only works with Python 3.10 and .NET 6, realistically even just spending five minutes messing with it will require first waiting 18 months or whatever.

> waiting 18 months or whatever Seems like a problem with however your system distributes software, not with Pyjion. What does it take 18 months to do?

Well for one I can't run Python 3.10 in production because I use AWS Elastic Beanstalk, which currently only supports 3.8. And my development environment is Ubuntu, which also doesn't support it out of the box. So short of scheduling two weeks to retool both my production and local development environments, which I'm not going to do because it would be a complete waste of time, there is zero benefit to me to even looking into this.

Re: Pyjion – A Python JIT Compiler

#47

Earlier quoted context omitted.

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.

Damn I didn't know any of the Futamura Projections where actually implemented in practice.

Sounds to me like PyPy has been using Futamura projections for a decade or so.

Re: Pyjion – A Python JIT Compiler

#48
post #31

Earlier quoted context omitted.

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

That's misleading as normal type annotations don't give you any performance benefit at all and you may need to do a lot more than just add type annotations. I think it's far more accurate to say that Cython is a programming language of its own that is a hybrid of Python and C++, that happens to produce CPython extension modules when compiled. The performance benefits are really achieved by incrementally changing your…

"This page used to list bugs in Cython that made the semantics of compiled code differ from that in Python. Most of the missing features have been fixed in Cython 0.15. A future version of Cython is planned to provide full Python language compatibility."

Re: Pyjion – A Python JIT Compiler

#49
post #47

Earlier quoted context omitted.

Damn I didn't know any of the Futamura Projections where actually implemented in practice.

Sounds to me like PyPy has been using Futamura projections for a decade or so.

Can you link me to some sources? I'm not familiar with PyPy but I thought it's a normal tracing JIT. In fact quick googling shows a blog post explicitly saying PyPy does NOT use PE: https://www.pypy.org/posts/2018/09/the-first-15-years-of-pyp....

Besides not every PE instance is a Futurama Projection.

Re: Pyjion – A Python JIT Compiler

#50

Earlier quoted context omitted.

> waiting 18 months or whatever Seems like a problem with however your system distributes software, not with Pyjion. What does it take 18 months to do?

Well for one I can't run Python 3.10 in production because I use AWS Elastic Beanstalk, which currently only supports 3.8. And my development environment is Ubuntu, which also doesn't support it out of the box. So short of scheduling two weeks to retool both my production and local development environments, which I'm not going to do because it would be a complete waste of time, there is zero benefit to me to even loo…

Right, but those are you-problems. You use a way to get dependencies that's very slow. That's not a Pyjion problem.
Post reply on HN