~/talk

GIL: What's the hassle and... should I care?

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python, concurrency]
slides:none on file

Explains that the GIL exists to protect reference counting and many C extensions that assume a single global lock, and that historical experiments often cut single-thread performance by ~50% when removing it. Notes PEP 703 proposes an optional no‑GIL CPython build (3.13 will offer two builds), but compatibility and performance tradeoffs remain. Recommends concrete steps: measure with cProfile or perf, consider multiprocessing, subinterpreters via the C API, C/Cython (nogil) or Rust extensions, and only worry for CPU‑bound multithreaded code.

AI-written summary · about

  1. 0:00Introduction to GIL myths
  2. 2:41What is a thread and process
  3. 9:39Python memory management basics
  4. 13:20What is the Global Interpreter Lock
  5. 18:23Why removing the GIL is hard
  6. 21:54PEP 703 and future plans
  7. 25:33When GIL matters and solutions
  8. 30:14Summary and should you care
  9. 30:56Q&A: GIL removal feasibility
  10. 33:26Q&A: GIL performance impact
  11. 37:41Q&A: Testing challenges post-GIL
  12. 40:13Q&A: Multiprocessing vs threading
~/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.