Python 3.15's JIT is now back on track
Great news from the Faster CPython team - they've hit their performance goals for the CPython JIT over a year early! The 3.15 alpha JIT is about 11-12% faster on macOS AArch64 and 5-6% faster on x86_64 Linux.
Key Achievements
- Performance gains: 11-12% faster on macOS AArch64, 5-6% faster on x86_64 Linux
- Range: 20% slowdown to 100%+ speedup depending on workload
- Timeline: Goal originally for 3.16, achieved in 3.15
The Turning Point: After losing main sponsor funding in 2025, the team pivoted to community stewardship. At the CPython core sprint in Cambridge, they wrote a plan for 5% faster JIT by 3.15 and 10% by 3.16.
What Changed (3.13/3.14 → 3.15)
The author attributes success to "luck - right time, right place, right people, right bets." Key factors:
- Trace Recording Rewrite: Rewrote JIT frontend to a tracing approach in just 3 days (initial prototype)
- Dual Dispatch Innovation: Misunderstood a suggestion but discovered an even better approach - using only one instruction for tracing instead of dual versions, keeping the base interpreter ultra-fast
- Community Growth: Bus factor improved from 2 to 4+ active maintainers in middle-end
- 分解大问题: Broke complex problems into manageable parts, attracting 11 contributors
Impact
Trace recording increased JIT code coverage by 50%, meaning all future optimizations have much broader reach. The JIT went from 1% faster (x86_64 Linux) to 3-4% faster during the community optimization period.
Free-threading support is still coming in 3.15/3.16.