You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT/Tier 2 tracing: plans for function-entry hotness triggers (hot callbacks from C loops)? #143778
Title: JIT/Tier 2 tracing: plans for function-entry hotness triggers (hot callbacks from C loops)?
Question
When experimenting with the experimental JIT (PEP 744), I got the impression that trace construction / compilation is primarily triggered by loop/backedge warmup (e.g. JUMP_BACKWARD backoff counters) plus side-exit temperature mechanics, rather than by “hot function entry” call counts.
If that’s correct:
Is this an intentional design choice for now?
Are there plans (or prior discussions) to support function-entry hotness triggers too?
Why I’m asking (workloads impacted)
Some real workloads execute a small Python callback many times from C-level loops, so there may be no Python-level backedge to ever warm up. Examples include:
changed the title [-]Title: JIT: consider triggering trace recording from hot function entries (not only loop/backedge hot spots)[/-][+]JIT: consider triggering trace recording from hot function entries (not only loop/backedge hot spots)[/+]on Jan 13, 2026
changed the title [-]JIT: consider triggering trace recording from hot function entries (not only loop/backedge hot spots)[/-][+]JIT/Tier 2 tracing: plans for function-entry hotness triggers (hot callbacks from C loops)?[/+]on Jan 13, 2026
Activity
[-]Title: JIT: consider triggering trace recording from hot function entries (not only loop/backedge hot spots)[/-][+]JIT: consider triggering trace recording from hot function entries (not only loop/backedge hot spots)[/+][-]JIT: consider triggering trace recording from hot function entries (not only loop/backedge hot spots)[/-][+]JIT/Tier 2 tracing: plans for function-entry hotness triggers (hot callbacks from C loops)?[/+]Fidget-Spinner commentedon Jan 13, 2026
Please see #142982. We do plan to eventually trace from function entry.
Fidget-Spinner commentedon Mar 16, 2026
@113xiaoji I see that you're interested in AArch64 performance?
Right now, the 3.15 JIT benchmarks around 9-10% faster on pyperformance than tail-calling interpreter on macOS AArch64 https://doesjitgobrrr.com/.
3.13-3.14 JIT will have mostly no speedup (in fact, negative probably) for AArch64.