~/talk

Inlining: bright victories and hidden defeats

Talkat Golang Piter 2019 · on Friday, 2019-11-01· [compilers-and-language-design]
links:none on file
slides:none on file

Explains how Go’s function inlining actually works: compiler uses a budget = 80 cost model (counts base ops and call cost), inlining exists since Go 1.10, mid-stack inlining lands in 1.12 and more fixes target 1.14. Shows concrete tradeoffs: call overhead ~1–2 ns vs add ~0.1 ns, typical binary size growth 2–3% (experiments 7–50%), a hot/cold split yields ~6x speedup in a microbenchmark and moving heap allocations into inlined code eliminates them giving roughly 3x speed improvements.

AI-written summary · about

  1. 0:00Inlining introduction
  2. 2:08What is inlining
  3. 5:38Inlining pros and cons
  4. 7:23Inlining in Go
  5. 10:14Function cost model
  6. 13:06Infinite loop example
  7. 16:44Cooperative multitasking issues
  8. 17:46Non-tail call inlining
  9. 21:19Inlining in practice
  10. 23:54Memory optimization and escape analysis
  11. 28:07Where optimization applies
  12. 30:15Future of compiler optimization
  13. 32:47JSON parsing optimization
  14. 34:57Q&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.