~/talk

Profiling and Optimizing Go Programs

Talkat GoWayFest 2017 · on Friday, 2017-07-21· [go]
links:none on file
slides:none on file

Shows concrete fixes: a slice-backed cache outperforms map until about 6–7 items, mutex contention on gets disappears when switching to a read lock and removing costly defer, a handwritten popcount benchmark disappears without a global sink because the compiler inlines and eliminates it. Demonstrates using pprof and execution tracer, CPU profiler defaults to 100Hz (up to ~500Hz via setprofile rate), block/mutex/heap/mutex profiles, and system tools like perf / BPF and go tool trace to add symbols and labels.

AI-written summary · about

  1. 0:00Introduction to profiling
  2. 1:57Profiling strategy
  3. 4:50Benchmark pitfalls
  4. 9:51Best practices for testing
  5. 12:23Using pprof tools
  6. 15:19Block and mutex profiling
  7. 17:29Custom profiles and labels
  8. 19:34Execution tracer
  9. 24:06System-level tracing
  10. 28:31Efficient Go patterns
  11. 32:42Q&A and conclusion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.