Goodbye GIL: Exploring the Free-threaded mode in Python
summary
Python 3.13 adds an optional free‑threaded interpreter and the presenter builds a benchmark repo and a Flask app, uses virtualenvs, sys.is_gil_enabled and k6 and measures real numbers: the reference patch touches 15,000 lines, single‑thread work slows (1.98s → 2.4s, earlier ~30% penalty later 5–10%), IO timings stay similar (~0.61s), CPU multi‑threading shows 3x improvement and Flask CPU throughput rises from ~5.4 to ~19.9 req/s, so free‑threaded Python materially helps CPU‑bound multithreaded workloads.
AI-written summary · about
chapters (12)
- 0:00Free-threaded Python intro
- 3:06Global Interpreter Lock explained
- 6:46PEP 703 challenges
- 11:35Free-threaded Python state
- 12:39Setting up free-threaded mode
- 13:44Verifying interpreter
- 15:10Single-threaded benchmarks
- 17:23I/O bound benchmarks
- 20:54CPU bound benchmarks
- 23:21Web app performance
- 26:37Benchmark summary
- 27:42Future of GIL
related talks
29mPython's Infamous GIL
30mFree threaded Python past, present and future
38mDemystifying the GIL
01h 05mHigh-Performance Python: Faster Type Checking and Free Threaded Execution
39mUnlocking the Parallel Universe: Subinterpreters and Free-Threading in...
28mThe GIL is dead: PyPy-STM
44mUnraveling Community Support For Free-Threaded Python
30mBuilding a NoGIL Load Balancer in 30 minutes
