~/talk

Supercharge your Python library using AST parsing

Talkat PyCon US 2025 · 2025-05-16..05-18· [python, web-performance]
links:none on file
slides:none on file

Shows concrete AST rewrites using Python’s stdlib ast plus the Python/C API to turn user node functions into generators that maintain state, replace frequent CSP.tic and CSP.output calls with member-slot ops to avoid attribute lookups, and map C++-side values into the fast locals array so Python loads are cheap. Benchmarks show the slot trick gives about 1.5–2x faster call performance; these transforms power the open‑source CSP runtime and run in production but require upkeep across Python 3.9–3.12.

AI-written summary · about

  1. 0:00AST parsing in Python
  2. 2:53Abstract syntax trees
  3. 11:04Computation graphs and CSP
  4. 15:36Functions to generators for state
  5. 18:01Optimizing member calls with AST
  6. 21:50C++ data as local variables
  7. 26:28Conclusion
  8. 27:12Q&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.