~/talk

Trying No GIL on Scientific Programming

Talkat PyData Global 2022 · 2022-12-01..12-03· [python]
slides:none on file

Claim: nogil fork on Python 3.9 can remove the GIL and speed CPU‑bound scientific code. Experiment uses scikit‑learn, NumPy and SciPy examples, C extensions where present, and ran each test 50 times on a dual‑core MacBook. Results are mixed: most benchmarks show no significant speedup, linear‑algebra/image filters sometimes improve (nogil > CPython 3.9 but not 3.11), decision tree and some ML runs are slower. TensorFlow/PyTorch aren’t tested because compatible builds aren’t available.

AI-written summary · about

  1. 0:00Introduction
  2. 1:09What is the GIL
  3. 4:03Why Python’s GIL exists
  4. 6:09Introducing No-GIL Python
  5. 7:36Why No-GIL speeds Python
  6. 8:39Challenges in No-GIL design
  7. 11:51Thread safety in No-GIL
  8. 13:38CPython API changes
  9. 14:40New memory allocator
  10. 15:41Garbage collection in No-GIL
  11. 16:04Testing No-GIL on science
  12. 17:26Experiment design
  13. 19:13Results for Support Vector Machine
  14. 20:58Clustering results
  15. 21:42Decision tree results
  16. 22:03Linear algebra results
  17. 23:49Neural network results
  18. 24:52Why No-GIL didn’t help
  19. 26:21Compatibility challenges
  20. 27:05Conclusion
~/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.