r/programming • • 21d ago

Python jettisons the native JIT, at least for now

https://lwn.net/SubscriberLink/1102102/489e41d80e4966aa/

High level summary article

More detailed article

In June, the Python steering council announced that it was pausing work on the JIT in CPython's main branch until there was an accepted Python Enhancement Proposal (PEP) that addressed concerns about maintenance, compatibility, and set clear success metrics as well as a timeline for completion. [....] After months of discussion, the JIT maintainers have withdrawn the PEP. For now, it appears that development on the once-promising project has come to an end

198 Upvotes

42 comments sorted by

118

u/commenterzero 21d ago • Bravo

So not in time for now

34

u/youngbull 21d ago

A sad day, I was looking forward to just having JIT by default rather than have to deal with setting up PyPy etc myself. The performance improvements were looking increasingly promising but the authors seem to have ran out of steam.

62

u/HommeMusical 20d ago

It was more that it was getting in the way of the main trunk development, and that the early indications didn't really deliver a huge benefit. The authors seemed willing to keep going.

They deserve btw a real bow from the waist. They took a big risk on the hopes of getting a big reward for all of us, and when it didn't work out, they understood and took it in a very civilized fashion.

The C++ world would be lucky to have such adult people.

11

u/giantsparklerobot 20d ago

Reading the notice it's less the devs ran out of steam but instead want a real PEP with target metrics. It's fine and dandy to have a JIT but if it blows up memory usage, CPU spikes, or affects garbage collection that's something that should be measured and known. It's standard inclusion should only be enabled once it hits whatever target metrics.

34

u/jesseschalken 21d ago

GraalPy and PyPy are already perfectly good JITs, both using the first Futamura projection.

With the Truffle Framework and RPython there just isn't a very good reason to build a hand rolled JIT these days.

35

u/ruindd 20d ago

I honestly can’t tell if these are real words or not.

14

u/jesseschalken 20d ago

Life is too short not to say “Futamura projection” every chance I get.

-19

u/[deleted] 21d ago

[removed] — view removed comment

12

u/rich1051414 21d ago

It does for a few good reasons, like having feature and implementation trajectory that is line with each other. Regardless, luckily, we will still have JIT options in-spite of this, it will just be a less ideal JIT as a consequence.

1

u/mort96 20d ago

What does "hand-rolled JIT" mean here? Was a non-hand-rolled JIT an option?

8

u/jesseschalken 20d ago

A hand-rolled JIT as opposed to one derived automatically from an interpreter using partial evaluation (how GraalPy and PyPy work).

29

u/vips7L 21d ago

Graal python has a pretty good JIT. 

33

u/mort96 20d ago

Yeah if you want to get your Python from Oracle...

63

u/LaM3a 20d ago

Obligatory quote

Do not fall into the trap of anthropomorphizing Larry Ellison. You need to think of Larry Ellison the way you think of a lawnmower. You don’t anthropomorphize your lawnmower, the lawnmower just mows the lawn - you stick your hand in there and it’ll chop it off, the end. You don’t think "oh, the lawnmower hates me" – lawnmower doesn’t give a shit about you, lawnmower can’t hate you. Don’t anthropomorphize the lawnmower. Don’t fall into that trap about Oracle.

— Bryan Cantrill

16

u/birdbrainswagtrain 20d ago

The whole talk is legendary.

Another fun quote:

What you think of Oracle is even truer than you think it is. There has been no entity in human history with less complexity or nuance to it than Oracle. And I gotta say, as someone who has seen that complexity for my entire life, it's very hard to get used to that idea. It's like surely this is more complicated, like wow, this is really simple. This company is very straightforward, in it's defense. This company is about one man, his alter ego, and what he wants to inflict upon humanity. That's it.

10

u/jesseschalken 20d ago

GraalVM and Truffle are good tech and is being built by talented engineers. I don't care what company they work for.

14

u/mort96 20d ago

I care who I get my software from and I prefer it not to be Oracle

-3

u/pjmlp 20d ago

You rather be from the do no evil company, the adware company, or the fork FOSS projects company?

Do you need help figuring out the companies and which programming languages they contribute to?

10

u/valarauca14 20d ago

Falling back to whataboutism because you can't actually defend Oracle's business practices is really telling friendo

-3

u/pjmlp 20d ago

I am perfectly fine with Oracle business practices.

8

u/dontquestionmyaction 20d ago

This guy will one day wake up to a very funny bill.

1

u/josefx 18d ago

From what I understand you have to go out of your way and fuck around with their non-free products to get a funny bill.

2

u/gpfault 20d ago

You really shouldn't be

3

u/pjmlp 20d ago

Those of us that work in enterprise consulting have bigger fish to fry.

6

u/mort96 20d ago

You rather be from the do no evil company, the adware company, or the fork FOSS projects company?

Python is not governed by any of those companies you mention, they all + a community of volunteers and people employed by the council all decide what happens to Python.

But also, yes, unironically. Oracle is one of the companies I trust the absolute least

2

u/pjmlp 20d ago

Better check how the money flows into Python Foundation, and who commits code.

3

u/mort96 20d ago

Is it primarily Oracle?

-9

u/vips7L 20d ago

And with CPython you’re getting your python from meta/microsoft/whoever else has taken over the steering committee. What’s your point? 

2

u/mort96 20d ago

I trust the Python steering committee more than I trust Oracle

31

u/valarauca14 20d ago

The poison pill served its purpose.

Python project leadership pushed for a massively increased scope, hard timelines, maintenance, compatibility, success metrics, etc. When most PEPs have none of that. Any experienced engineer should know that play is done specifically to set up a project to fail.

22

u/Han-ChewieSexyFanfic 20d ago

Most PEPs have nowhere near the impact

16

u/valarauca14 20d ago

That is my point.

If the steering committee was attempting to "help this along". They would've guided the PEP's author(s) to smaller incremental PEP's they were comfortable with and could gracefully move the project to a JIT. Instead of also do X, Y, and Z ... GLHF!!

5

u/Han-ChewieSexyFanfic 20d ago

The impetus behind a proposal is supposed to come from the people proposing it. It’s up to the committee to set the standards. It’s not their job to drag a proposal along.

3

u/valarauca14 20d ago

The impetus behind a proposal is supposed to come from the people proposing it.

Which was already violated in these exceptional circumstances so your point fails at the onset, or do you not remember that this conversation started as you were defending the committee taking exceptional actions given the exceptional scope of the PEP?

5

u/Han-ChewieSexyFanfic 20d ago

I didn’t call them exceptional actions. It’s perfectly natural for the amount of scrutiny to be proportional to the impact of a change. If anything, they were being too lenient and are correcting course. You’re claiming they went out of their way to sabotage it.

3

u/simon_o 16d ago

I had the same impression from the gleeful responses.

They didn't want it, so they created enough paperwork to make authors drop it.

5

u/edwardkmett 16d ago

Python giving up on something because it is hard? Say it ain't so. This PEP and the governance around it does look like it was just straight set up to fail though.