It’s common to hear complaints about Python being slow. In this talk, I will show how to make some Python programs dramatically faster by using Python 3.14’s free threading and ahead-of-time compilation to C extensions using mypyc.
Free threading can deliver large speedups for CPU-bound code that can be adapted for parallel execution, while mypyc speeds up workloads that benefit from reduced interpreter overhead and that use strict static typing. If each can give a 10× speedup in an ideal use case, do we get a “holy grail” 100× improvement by combining them?
I’ll walk through several small, readable examples distilled from real-world workloads, measuring and explaining what changes when you apply free threading, mypyc, or both. In practice, relatively few programs are excellent fits for both techniques at once, but when they are, you can see substantial gains. Having both tools available gives you more options for attacking performance problems, while staying entirely in Python (and CPython).
Along the way, I’ll cover common bottlenecks that limit performance scaling and how to diagnose them, including allocation-heavy code and thread contention driven by reference counting.