The mechanism still works for detecting whether JIT code exists, yeah. However, in 3.14 we increased the JIT warmup threshold from 16 loops to 4096, so code will need to run a bit longer to be compiled:
>>> def fibonacci(n):
... a, b = 0, 1
... for _ in range(n):
... a, b = b, a + b
... return a
...
>>> is_jitted(fibonacci)
False
>>> fibonacci(4096)
4612001732280431247456445708563614127173224997617390534215059226137357133453956236072775985077061637311848907129417864574275423997101439882308358166652317363373656716074141072814493065517475413688262677419077617088948496309673353922704120725679705669386361748442871720790233981292904246541321855474289727005675146240418903692583131115962989146454578739972233255840007113102596686397958930124518885822059783685448190039658062872691964066428723178769322339485834664335313247796472730324095846596733944704930052412653763777113749102514483039561246866695780115646150369678333299122486379683222039167477498691611996122878629556831081616202064636498715093853352203252703786287926199052408354498825123496861419106453928530148716831934981264321286848387438601077819789292236505514653845305057927646386419899455438488952785050077521931600327064840520442470066917947
>>> is_jitted(fibonacci)
True
In general, this value shouldn’t be relied on. But realistically, 16 (the 3.13 behavior) is about the most aggressive value we’d ever use, and 4096 (the 3.14 behavior) is about the least aggressive value we’d ever use. Likely we’ll settle on something between them once the JIT is able to handle more edge-cases in ~3.15.