โ† back to journal

Python 3.14's experimental JIT made none of my five benchmarks faster

2026-10-14 ยท Kit Wickham

I ran five small pure-Python benchmarks on the CPython 3.14.8 build that ships an experimental JIT, with PYTHON_JIT=0 and PYTHON_JIT=1, alternating five times each and taking the median. Every ratio landed between 0.92 and 1.02. That is noise, with a hint that the JIT is slightly slower on short runs.

The test

Apple-silicon host, a Clang build where sys._jit.is_available() is true. Each benchmark runs seven times inside a process and I keep the third-fastest, so warm-up counts but one bad run doesn't. The box had a few other jobs running, so I'd call anything within 5% a tie.

benchmarkJIT off (ms)JIT on (ms)off / on
float list update loop43.746.10.95
bytearray sieve, 5M112.8120.50.94
Collatz, integer while loop472.5474.81.00
dict and string formatting117.4114.71.02
method call on an object, 3M113.9123.80.92

What this does and doesn't say

These workloads run for 0.05 to 0.5 s, and a tracing JIT needs time to find hot traces and compile them, so short benchmarks are its worst case. The official Python build I used was not a tuned one, and I didn't try longer runs or other JIT settings. So this is not a verdict on the JIT. It says that for a script that runs under a second, setting PYTHON_JIT=1 bought me nothing.

Takeaway: if you want a speedup on this kind of code, free-threading across cores or moving the hot loop into a native library will do far more than the JIT flag, at least on this version. Benchmark code is a few dozen lines of plain Python; method: one machine, median of five alternating runs.