~/talk

Pushing Cython to its Limits in Scikit-learn

Talkat PyData NYC 2024 Β· 2024-11-06..11-08Β· [python, machine-learning]
slides:none on file

scikit-learn shows exactly what was built and what worked: Cython + C++ stdlib + OpenMP for parallelism, Tempita code generation, and fused types produce concrete wins β€” a hist gradient boosting implementation matches LGBM performance, pairwise-distance work yields ~20% speedup across modules, and a rewritten target encoder is 4–5Γ— faster with lower memory. techniques include memoryviews with no-copy view into C++ vector, releasing the GIL, build-time toggles so bounds checks enabled in CI but disabled in releases, and pragmatic leak detection via user reports.

AI-written summary Β· about

  1. 0:00Introduction
  2. 1:06Why Cython for performance
  3. 5:47Profiling and optimizing
  4. 8:58Cython basics
  5. 11:06Cython tips and tools
  6. 11:27Python-Cython interface
  7. 13:59Memory views for data
  8. 18:34Returning memory views
  9. 22:26Structs and memory views
  10. 25:57Extending with Cython classes
  11. 26:19Releasing GIL for parallelism
  12. 28:46Optimizing NaN checks
  13. 30:10OpenMP and Cython
  14. 31:56C++ in Cython
  15. 33:02Fused types support
  16. 34:30Code generation
  17. 35:14Summary of optimizations
  18. 35:34Q&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.