~/talk

"Performant Python"

Talkat PyCon AU 2024 · 2024-11-22..11-26· [python]
links:none on file
slides:none on file

Uploader describes an intro to writing performant Python and the work focuses on CPython profiling with cProfile and visualization with snakeviz plus timeit for comparisons. A customer reports a 20x regression in JSON model deserialization; profiling surfaces a 709 recursive copy calls, a fallback serializer called across ~161,000 items and ~736,000 isinstance checks. Iterative fixes—remove repeated copies, eliminate the noop serializer, refactor to EAFP and reorder checks—cut runtime from ~36s down to ~3.38s, ~4x so far.

AI-written summary · about

  1. 0:00Introduction
  2. 2:12Why performance matters
  3. 5:43Profiling with cProfile
  4. 10:54Deserialization bottlenecks
  5. 13:47Optimizing functions step by step
  6. 17:59Validating with timeit
  7. 20:06Efficient Python from scratch
  8. 22:34Performance vs readability
  9. 24:21C extensions for performance
~/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.