Community perspectives on the JIT: experiences, expectations, and concerns

I’m packaging CPython for Gentoo. We have optional JIT builds since 3.13.

My early experience with JIT (somewhere early in 3.13) was that it broke too much, so I’ve switched back to non-JIT on my system and forgot about it.

A few months ago I’ve tried again, with 3.14. I haven’t seen any problems that would be clearly related to JIT, and I’ve been using the JIT builds since. I’m maintaining most of the Python packages in Gentoo, so I’m running lots of test suites, and I found JIT builds to be stable. That said, I haven’t done any performance comparisons, so I can’t really talk about that.

I’ve also tried building 3.15 with JIT enabled, but the build failed due to assertions in bootstrap Python:

./_bootstrap_python ./Programs/_freeze_module.py abc ./Lib/abc.py Python/frozen_modules/abc.h
_bootstrap_python: Python/pystate.c:896: interpreter_clear: Assertion `cold_dynamic->vm_data.valid' failed.
make[2]: *** [Makefile:1991: Python/frozen_modules/abc.h] Aborted (core dumped)

(I’m sorry, I haven’t found time to report it properly.)

That said, the LLVM requirement itself is not that much of a problem for us (given a lot of software depends on LLVM these days), but pinning to a single LLVM version is. I mean, it practically means that anyone using Python 3.14 is stuck with LLVM 19 (which went EOL 1.5 year ago), and for Python 3.15 they need LLVM 21 instead (which went EOL over half a year ago). And if someone needs multiple Python versions (which is expected for Python developers), they either need to go for non-JIT, or install multiple LLVM versions.

9 Likes