Image

Antonio Cuni: Tracing JITs in the real world @ CPython Core Dev Sprint

.slide { border: 2px solid #ddd; border-radius: 8px; margin: 2em 0; background: #f9f9f9; max-width: 100%; width: 100%; box-sizing: border-box; padding: 2em; background: white; border-radius: 6px 6px 0 0; border-bottom: 2px solid #eee; display: block; min-height: 400px; height: auto; overflow-y: auto; overflow-x: hidden;}.slide h1, .slide h2, .slide h3 { margin-top: 0; color: #333;}

Tracing JITs in the real world @ CPython Core Dev Sprint

Last week I got to take part in the CPython Core Developer Sprint inCambridge, hosted by ARM and brilliantlyorganized by Diego Russo-- about ~50 core devs and guests were there, and I was excited to join as oneof the guests.

CPython Core Dev Sprint 2025, ARM, Cambridge
CPython Core Dev Sprint 2025, ARM, Cambridge

I had three main areas of focus:

C API: this was a follow up of what we discussed at theC API summit at EuroPython. The current C API is problematic, so we are exploring ideas for the development ofPyNI(Python Native Interface), whose design will likely be heavily inspired byHPy. It's important to underline that this is just the beginning and the entire process will require multiple PEPs.

fancycompleterThis is asmall PRwhich I startedmonths ago, to enable colorful tab completions within the Python REPL. I wrote the original version offancycompleter15 years ago, but colorful completions work only in combination with PyREPL. Now PyREPL is part of the standard library and enabled by default, so we can finally upstream it. I hope to see it merged soon.

"JIT stuff": I spent a considerable amount of time talking to the people who are working on the CPython JIT (in particular Mark, Brandt, Savannah, Ken Jin and Diego). Knowledge transfer worked in both ways: I learned a lot about the internal details of CPython's JIT, and conversely I shared with them some of the experience, pain points and gut feelings which I got by working many years on PyPy.

In particular, on the first day I presented a talk titledTracing JIT and real world Python(slidesandsource code).

What follows is an annotated version of the slides.

https://antocuni.eu/2025/09/24/tracing-jits-in-the-real-world--cpython-core-dev-sprint/