~/talk

Writing performant code for modern Python interpreters

Talkat PyCon US 2022 · 2022-04-27..05-03· [python]
links:none on file
slides:none on file

Modern interpreters like piston reduce interpretation overhead and apply JITs, and experiments show global lookups become much faster when globals aren’t reassigned (about 6× faster in one piston benchmark), but some old tricks backfire: caching methods used to cut ~66% on CPython yet method-cache can slow code on optimizers, math.sqrt and os.path.join show only tiny gains now, C extensions still win for numeric work, and attaching profilers often disables optimizations.

AI-written summary · about

  1. 0:00Introduction
  2. 1:35Why Python is slow
  3. 3:54New projects
  4. 4:32Controversial slide
  5. 8:38What makes Python slow
  6. 11:01Global Variables
  7. 13:49Attributes
  8. 16:42Happy case
  9. 17:38Avoid this
  10. 18:33Attribute lookup
  11. 19:24Benchmarks
  12. 22:16Dynamic features
  13. 23:17C extensions vs Python
  14. 26:08Conclusion
~/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.