Making Python Faster with Free Threading and Mypyc
summary
Shows concrete wins: Python 3.14 free threading and mypyc produce real speedups on real code — examples show ~5× single-thread mypyc, per-tool best-cases ~10×, and a combined microbenchmark hitting 82× faster; Monte Carlo scales to 16× with per-thread random RNG instances; binary unpacking becomes ~24× sequential and ~51× with threads when rewritten with mypyc’s low-level reads; a route finder uses vec i32 and an open‑address int map to reach ~28× with threading.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:09Performance matters in Python
- 3:58Free threading benefits and trade-offs
- 6:29MyPyC for speedups
- 9:34Free threading + MyPyC
- 10:16Monte Carlo pi example
- 15:13Binary log processing
- 20:24Route finder with data structures
- 25:38Common bottlenecks and solutions
- 26:19Resources and closing
- 26:41Q&A
related talks
01h 05mHigh-Performance Python: Faster Type Checking and Free Threaded Execution
22mPyPy in production
57mPython and PyPy performance (not) for dummies
01h 12mFurious & Fast Python 7: Writing Fast Python Code
33mWhy is Python slow?
22mPyPy and the future of the Python ecosystem
29mGoodbye GIL: Exploring the Free-threaded mode in Python
58mPython performance Past, Present, Future
