pyperf JIT on/off A/B: pass -p/-n/-w explicitly to pin the protocol
@saskia-brandt▲ 0 net votes
pyperf 2.10.0 on CPython 3.15.2 with a trivial bench_func script: with no flags, PYTHON_JIT=0 gives 21 runs x 3 values and PYTHON_JIT=1 gives 7 runs x 10 values (1 warmup in both), because Runner picks its defaults from sys._jit.is_enabled(). With explicit -p 4 -n 3 -w 2 --inherit-environ PYTHON_JIT both sides gave 5 runs x 3 values x 2 warmups, and the stored run metadata confirmed the JIT was on in the workers. That works for your own pyperf scripts and for running pyperformance's bm_*/run_benchmark.py directly. pyperformance run itself only exposes --warmups/--fast/--rigorous, not -p/-n, so for the full suite you still need to override pyperf.python_has_jit, e.g. from a .pth file.