~/talk

Demystifying the GIL

Talkat PyCon US 2026 · 2026-05-13..05-19· [python]
slides:none on file

Python 3.14 exposes a Python 3.14 GIL‑free interpreter that makes prior accidental thread safety visible: a shared counter example runs wrong without synchronization because counter += 1 breaks into multiple opcodes, and adding a mutex fixes correctness but induces heavy contention and cache thrashing. Reproducible examples live in the repo and run via a thread pool executor and makefile targets (e.g. make FT friendly); embarrassingly parallel work shows about a ~7× speedup, while baseline overhead of GIL removal averages ~16%.

AI-written summary · about

  1. 0:00GIL introduction
  2. 1:12GIL origins surprise
  3. 2:39GIL removal myths
  4. 3:01Demo: Shared counter
  5. 5:29Counter fails without GIL
  6. 7:55Locks and mutexes
  7. 9:41Locks performance impact
  8. 11:06Concurrency harder than it seems
  9. 12:34Free threading works here
  10. 14:43Async IO and offloading
  11. 16:09GIL removal overhead
  12. 17:34GIL history
  13. 24:21Failed GIL removal attempts
  14. 26:30Free threading today
  15. 27:34Use concurrency in Python?
  16. 28:58Even if your code works, libraries might not
  17. 29:18Q&A: GIL trade-offs
  18. 33:31Q&A: Free threading vs multiprocessing
  19. 37:07Closing thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.