News for hackers. Stuff that matters.
Re:Reflections on 2 years of CPython's JIT Compiler: The goo... by serjester on Tuesday July 08, 2025 @11:41AM (#44501064)
This article doesn't do the best job explaining the broader picture.

- Most of the work up this point has just been plumbing. Int/float unboxing, smarter register allocation, free-threaded safety land in 3.15+.

- Most JIT optimizations are currently off by default or only triggers after a few thousand hits, and skips any byte-codes that look risky (profiling hooks, rare ops, etc.). Stability is their #1 priority.

Recommend this talk with one of the Microsoft JIT developers, https://www.youtube.com/watch?v=abNY_RcO-BU

Re:Reflections on 2 years of CPython's JIT Compiler: The goo... by kenjin4096 on Tuesday July 08, 2025 @03:03PM (#44502960)
Hi, author of the post here, stability indeed has been a priority. There are some points which are not exactly the case though:

> - Most of the work has just been plumbing. Int/float unboxing, smarter register allocation, free-threaded safety land in 3.15+.

The first part is true, but for the second sentence: none of that is guaranteed to land in 3.15+. We proposed to land them, that doesn't mean they will. Landing a PR in CPython is subject to maintainer time and reviewer approval, which doesn't always happen. I proposed a few optimizations for 3.14 that never landed.

> Most JIT optimizations are currently off by default or only triggers after a few thousand hits

It is indeed true we only trigger after a few thousand hits, but all optimizations that we currently have are always enabled. We don't sandbag the JIT on purpose.