What problem does it solve?
It prevents misleading optimization decisions by teaching how to benchmark, profile, and compare Go performance results with enough rigor to distinguish signal from noise.
Core Features & Use Cases
- Benchmark authoring that avoids dead-code elimination: Prefer b.Loop() for Go 1.24+ and structure setup so results reflect the measured work.
- Reliable benchmark execution: Use -benchmem and multiple iterations (-count=10 or more) and capture outputs for later comparison.
- Profile-driven diagnosis: Generate CPU, heap (alloc_objects/alloc_space/inuse_space), and execution traces to pinpoint where time and allocations actually come from.
- Statistical comparison with benchstat: Interpret p-values, confidence intervals, and the meaning of "~" to decide whether changes are real.
- CI regression workflows: Gate performance changes using benchdiff/cob/gobenchdata with an emphasis on robustness under noisy CI conditions.
Quick Start
Tell the assistant: "Write benchmarks for my Go function, run them with -benchmem and -count=10, produce CPU/heap profiles for any hot spots, and compare before/after results with benchstat, explaining any cases where '~' indicates the change is not statistically significant."