~/talk

Boost application performance with profile guided optimization

Talkat GopherCon UK 2024 · 2024-08-14..08-16· [go]
slides:none on file

Go 1.21 adds profile guided optimization so the compiler uses real runtime profiles (place as default.pggo beside package main or pass -pggo) to guide inlining and escape analysis, often moving heap allocations to the stack. Using net/http/pprof and go tool pprof or a continuous profiler yields production profiles; typical wins are ~10% CPU and latency improvement (best ~15%, sometimes as low as 2%), reduced Cloud Run billable time, and stable iterative builds that tolerate source drift. peepoff and pprof packages help analyze changes.

AI-written summary · about

  1. 0:00Profile guided optimization intro
  2. 1:06Compiler optimizations
  3. 3:52Why separate functions
  4. 6:40How inlining improves performance
  5. 9:30Go heap vs stack
  6. 14:26Compiler heuristic limits
  7. 16:54PGO runtime profiles
  8. 19:23Collecting production profiles
  9. 22:53Building with PGO in Go
  10. 25:46Measuring PGO impact
  11. 27:31Deploying to Cloud Run
  12. 30:45PGO best practices
  13. 34:16Iterative PGO lifecycle
  14. 36:24Summary and call to action
  15. 38:50Q&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.