~/talk

Beyond the Basics - Advanced GIL Mitigation Patterns

Talkat PyCon India 2025 · 2025-09-12..09-15· [python, machine-learning]
slides:none on file

Shows concrete patterns: convert a NumPy RGB image to grayscale using Cython with nogil and OpenMP prange, compiled via cythonize into a .so and called from Python; uses typed memoryviews and unsigned char buffers to avoid Python overhead. Demonstrates threading failing on CPU work (sequential 7.2s vs threaded 8s for a countdown) and reports the Cython image pipeline running 0.03s versus 131.4s in pure Python — roughly 4,338× faster.

AI-written summary · about

  1. 0:00Introduction
  2. 1:57Multithreading and GIL overview
  3. 8:27GIL bottleneck demo
  4. 11:08Advanced mitigation strategies
  5. 13:57Cython introduction and demo
  6. 20:48Case study setup
  7. 23:18Pure Python grayscale implementation
  8. 24:43Threaded grayscale approach
  9. 25:27Cython nogil grayscale code
  10. 28:01Performance comparison results
  11. 30:51Conclusion and Q&A
~/search
type to search 6,518 conferences, 143,918 speakers and 192,133 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.