~/talk

Rethinking How We're Linking: What to do when speeding...

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

Claim: statically linking native extensions into the Python runtime cuts import overhead at very large scale. Implementation uses linkers/loaders, NM and llvm‑objcopy symbol renaming to avoid collisions, LLDB and call-profile tools to find DL_open hotspots, and PyImport_AppendInittab to embed modules. At Meta this lands ~2 megaw savings for one app, ~990,000 rollouts, and saved ~5,000 hours/week of build time; importing thousands (≈8,000) tiny C extensions becomes far faster, though small CLIs can see larger single-binary startup and relocation tradeoffs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:25Static linking C extensions
  3. 2:07Python C extension example
  4. 9:55Python vs C speed
  5. 19:17Slow imports in C extensions
  6. 22:08Static vs dynamic linking
  7. 29:15Embedding C extensions
  8. 36:22Performance impact of embedding
  9. 42:55Symbol collisions in linking
  10. 50:51Q&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.