golang-performance

Identify Go performance bottlenecks using pprof/fgprof profiling and benchstat validation.

4|Updated May 17, 2026
One-click install
npx skills add https://github.com/hellopoisonx/aim --skill golang-performance-hellopoisonx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-performance
Source: https://github.com/hellopoisonx/aim/tree/main/skills/golang-performance
Command: npx skills add https://github.com/hellopoisonx/aim --skill golang-performance-hellopoisonx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Golang-performance helps you reduce latency, CPU usage, and allocation/GC pressure in Go code by choosing the correct optimization pattern based on evidence rather than intuition.

Core Features & Use Cases

  • Profiling-first methodology: Emphasizes measuring hot spots with tools like pprof/fgprof and validating improvements with atomic benchmarks and benchstat.
  • High-leverage performance patterns: Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path safeguards with decision guidance.
  • When to use it: Use during performance code review or when profiling/benchmarks already identified a bottleneck you want to fix (not to replace benchmarking methodology or debugging workflows).

Quick Start

Apply the golang-performance skill to your Go project by first profiling with pprof/fgprof to identify the bottleneck, then ask it which specific optimization pattern to apply and what single benchmark to run to verify the improvement.

Frequently Asked Questions about golang-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify and fix Go performance bottlenecks?

To reduce Go allocation pressure, profile your hot path with pprof to identify memory-heavy code, then apply optimization patterns like sync.Pool, caching, and memory layout changes, validating improvements with atomic benchmarks and benchstat comparisons.

What is the best way to reduce Go allocation pressure and GC overhead?

To reduce Go allocation pressure, profile your hot path with pprof to identify memory-heavy code, then apply optimization patterns like sync.Pool, caching, and memory layout changes, validating improvements with atomic benchmarks and benchstat comparisons.

How do I use pprof and benchstat for iterative Go optimization?

Use pprof to identify CPU-bound or GC-pressured code locations, implement a single targeted optimization pattern, and run atomic benchmarks with benchstat to compare results iteratively, ensuring evidence-driven improvements without relying on intuition.

Does this profiling-first workflow handle CPU-bound and I/O concurrency adjustments?

Yes, the profiling-first workflow handles CPU-bound and I/O concurrency adjustments by selecting specific optimization patterns driven by pprof and trace signals, targeting hot-path safeguards and runtime tuning to improve overall execution efficiency.

When should I not use targeted Go performance patterns for code review?

Do not use targeted Go performance patterns to replace standard benchmarking methodology or debugging workflows; apply them specifically during performance code review when profiling has already identified a distinct bottleneck needing targeted improvement.