~/talk

No more Locks! What can we achieve without the GIL

Talkat PyCon Italia 2025 · 2025-05-28..05-31· [compilers-and-language-design]
links:none on file
slides:none on file

Live demos measure raw effects not promises: a count to 10 million microbenchmark on a 32‑core laptop shows multithreading on stock CPython stays single‑core and gets slower, multiprocessing runs parallel but blows up memory, and an experimental free‑threaded Python 3.13 build puts CPU usage across cores and runs faster with the same code. Shared‑memory examples (naive matrix multiply) require copying or redesign to avoid races; using NumPy/GPU beats all pure‑Python approaches. Expect tradeoffs in GC, locking, and API changes.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Concurrency and parallelism
  3. 2:29Global Interpreter Lock
  4. 3:58Single-threaded demo
  5. 5:03Multi-threaded demo
  6. 6:11Thread pool executor
  7. 9:04Threading limitations
  8. 10:09Threading for I/O
  9. 13:00Multiprocessing demo
  10. 14:51Python 3.13 free-threaded
  11. 17:46Memory usage comparison
  12. 19:13Thread-safe data sharing
  13. 21:02Embarrassingly parallel tasks
  14. 22:48Matrix multiplication
  15. 24:32When to use threads
  16. 25:58Python as orchestrator
  17. 26:45Q&A
~/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.