What problem does it solve?
Go services and libraries suffer from hard-to-find performance issues such as excessive allocations, GC pressure, CPU-bound hot loops, lock contention, and off-CPU I/O waits; this skill helps diagnose and prescribe targeted fixes so you optimize the right hotspot instead of guessing.
Core Features & Use Cases
- Profile-first methodology: Guided workflow to define metrics, gather pprof/fgprof/traces, create atomic benchmarks, and validate improvements with benchstat.
- Allocation & memory guidance: Patterns to reduce allocs, avoid backing-array leaks, use sync.Pool safely, and reorder structs for optimal layout.
- CPU, concurrency & I/O fixes: Advice on inlining, ILP, cache locality, false-sharing mitigation, connection-pool tuning, and batching strategies.
- Production tuning & observability: Recommendations for GOGC/GOMEMLIMIT/GOMAXPROCS, continuous profiling, Prometheus queries, and CI benchmark regression detection.
- Use case: When pprof or fgprof shows a hotspot, run this skill to get a prioritized, single-change optimization plan with concrete benchmark commands and expected measurement steps.
Quick Start
Profile your Go process (pprof or fgprof) and provide the CPU and heap profiles, then ask for a single prioritized optimization with the benchmark commands to verify improvement.