~/talk

A low latency deepdive of Python with Cython

Talkat PyCon US 2024 · 2024-05-15..05-23· [python]
links:none on file
slides:none on file

Benchmarks compare raw Python to compiled Cython: microbenchmarks use Intel pmu counters and generated C to measure instruction counts (adding two ints costs ~528 CPU instructions in untyped Python). Replacing Python objects with C types and a memory view yields ~30× speedup (random access down to ~180 ns), moving the loop into Cython removes ~150 ns per Python-call overhead, and a fully typed, nogil inner loop reaches single‑digit nanoseconds (~5 ns) with correct behavior.

AI-written summary · about

  1. 0:00Python performance with Cython
  2. 2:12CPython interpreter internals
  3. 8:36Python ops baseline
  4. 11:24What Cython is
  5. 14:19Python vs Cython microbenchmarks
  6. 18:17When to use Cython
  7. 19:02Optimizing data frame lookups
  8. 25:08Performance benchmarks summary
  9. 26:13Q&A on Cython, Rust, latency
~/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.