Two Go programs, three different profiling techniques, all in 40 minutes
summary
Compares three concrete Go profilers: CPU sampling via go tool pprof, heap sampling (allocations) and the execution tracer that exports to Chrome DevTools. Shows a word-count program that drops from ~1.1s to ~0.01s after adding a buffered reader (removes per-byte syscalls), then reveals 1.2MB of allocations from one-byte buffers and fixes them to cut GC overhead. Shows a Mandelbrot build where per-pixel goroutines cost more than they help and switching to per-row/workers yields ~4x speedup, illustrating Amdahl’s Law.
AI-written summary · about
chapters (6)
- 0:00Start
- 10:37Heap Profile
- 23:31Source Code
- 24:58The Execution Tracer
- 26:12Trace Profiling
- 31:19Trace File
related talks
44mGo Profiling and Observability from Scratch
26mPractical Memory Profiling
40mProfiling real-world golang service
33mBuilding a Go Profiler Using Go
29mOptimizing Go Code Without a Blindfold
51mObscure Go Optimisations
45mBoost application performance with profile guided optimization
14mOptimizing Go code without a blindfold
