Live data from Hacker News

Python 3.15's JIT is now back on track

fidget-spinner.github.io

11–20 of 330 posts

Re: Python 3.15's JIT is now back on track

#11
post #7

I'm been occasionally glancing at PR/issue tracker to keep up to date with things happening with the JIT, but I've never seen where the high level discussions were happening; the issues and PRs always jumped right to the gritty details. Is there anywhere a high-level introduction/example of how trace projection vs recording work and differ? Googling for the terms often returns CPython issue tracker as the first resul…

You’ll probably want to look to the PEPs. Havent dug into this topic myself but looks related https://peps.python.org/pep-0744/

Re: Python 3.15's JIT is now back on track

#12
What is wrong with the Python code base that makes this so much harder to implement than seemingly all other code bases? Ruby, PHP, JS. They all seemed to add JITs in significantly less time. A Python JIT has been asked for for like 2 decades at this point.

Re: Python 3.15's JIT is now back on track

#14

Doesn't PyPy already have a jit compiler? Why aren't we using that?

Because PyPy seems to be defunct. It hasn't updated for quite a while. See https://github.com/numpy/numpy/issues/30416 for example. It's not being updated for compatibility with new versions of Python.

PyPy's devs disagree: https://news.ycombinator.com/item?id=47293415

Re: Python 3.15's JIT is now back on track

#16

Doesn't PyPy already have a jit compiler? Why aren't we using that?

Because the same people who made a big deal about supporting PyPy and PEP 399 when it was fashionable to do so are now told by their corporations that PyPy does not matter. CPython only moves with what is currently fashionable, employer mandated and profitable.

Re: Python 3.15's JIT is now back on track

#17

(what are blueberry, ripley, jones and prometheus?)

Yes, the graphs are incomprehensible because those are not defined in the article. They turn out to be different physical machines with different architectures: https://doesjitgobrrr.com/about

  blueberry (aarch64)
  Description: Raspberry Pi 5, 8GB RAM, 256GB SSD
  OS: Debian GNU/Linux 12 (bookworm)
  Owner: Savannah Ostrowski

  ripley (x86_64)
  Description: Intel i5-8400 @ 2.80GHz, 8GB RAM, 500GB SSD
  OS: Ubuntu 24.04
  Owner: Savannah Ostrowski

  jones (aarch64)
  Description: Apple M3 Pro, 18GB RAM, 512GB SSD
  OS: macOS
  Owner: Savannah Ostrowski

  prometheus (x86_64)
  Description: AMD Ryzen 5 3600X @ 3.80GHz, 16GB RAM
  OS: Windows 11 Pro
  Owner: Savannah Ostrowski

Re: Python 3.15's JIT is now back on track

#18
post #10

Earlier quoted context omitted.

Because PyPy seems to be defunct. It hasn't updated for quite a while. See https://github.com/numpy/numpy/issues/30416 for example. It's not being updated for compatibility with new versions of Python.

[flagged]

It supports at best Python 3.11 code, right?

So it’s not unmaintained, no. But the project is currently under resourced to keep up with the latest Python spec.

Re: Python 3.15's JIT is now back on track

#19
post #15

(what are blueberry, ripley, jones and prometheus?)

The names of the benchmark runners. https://doesjitgobrrr.com/about

So the biggest gains so far are on Windows 11 Pro of (x86_64) ~20%? Is that because Windows was bad as a baseline (promethius)? It doesn't seem like the x86_64/Linux has improved as dramatically ~5% (ripley). I'm just surprised OS has that much of an effect that can be attributed to JIT vs other OS issues.

Re: Python 3.15's JIT is now back on track

#20

What is wrong with the Python code base that makes this so much harder to implement than seemingly all other code bases? Ruby, PHP, JS. They all seemed to add JITs in significantly less time. A Python JIT has been asked for for like 2 decades at this point.

Some languages are much harder to compile well to machine code. Some big factors (for any languages) are things like: lack of static types and high "type uncertainty", other dynamic language features, established inefficient extension interfaces that have to be maintained, unusual threading models...
Post reply on HN