~/talk

Let's Talk About GIL!

Talkat Swiss Python Summit 2018 · on Friday, 2018-02-16· [python, concurrency]
links:none on file
slides:none on file

Explains why CPython threads do not speed CPU-bound loops: a Python benchmark shows 0.63s vs 0.9s when moving from one to two threads, while a C pthread example halves runtime; a simple C extension using Py_BEGIN_ALLOW_THREADS releases the GIL and achieves true parallelism. Demonstrates the reference-count race that motivates the GIL, contrasts tick-based (pre-3.2) with time-based GIL behavior, and lists practical alternatives: multiprocessing, C extensions, Cython; Gregg’s no-GIL patch hurts single-threaded performance.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 2:13What is a process and thread
  3. 3:36Multi-threading basics
  4. 5:43Multi-threading in C++ demo
  5. 8:44Python threading API
  6. 10:30Why GIL exists and its impact
  7. 14:52Python memory management and GIL
  8. 19:12Alternatives to GIL for parallelism
  9. 21:44C extensions to bypass GIL
  10. 27:57Visualizing threading performance
  11. 28:38Removing GIL challenges
  12. 30:44GIL improvements in Python 3.2
  13. 31:11Q&A on thread creation
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.