go-performance

Profile and benchmark Go services to identify and fix performance bottlenecks.

8|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/muratmirgun/gophers --skill go-performance-muratmirgun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-performance
Source: https://github.com/muratmirgun/gophers/tree/main/skills/go-performance
Command: npx skills add https://github.com/muratmirgun/gophers --skill go-performance-muratmirgun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you optimize Go performance without guessing, by turning slow code into measurable improvements with benchmarks, profiles, and evidence-based fixes.

Core Features & Use Cases

  • Measure-first optimization: Establish a baseline with benchmarks, then validate each change with repeated runs and benchstat.
  • Profile-driven diagnosis: Use pprof, fgprof, and escape analysis to identify whether the real bottleneck is allocations, CPU, GC pressure, locks, or external I/O.
  • High-ROI Go fixes: Apply proven patterns like preallocating slices and maps, using strconv instead of fmt for primitives, reducing boxing, tuning http.Client, and avoiding repeated string or byte conversions.
  • Production guardrails: Keep optimizations safe with verification checklists, comments explaining tradeoffs, and runtime tuning such as GOMEMLIMIT for containerized services.

Quick Start

Ask for a Go performance review of the slowest function, including benchmark design, profiling guidance, and the most likely allocation or hot-path optimizations.

Frequently Asked Questions about go-performance

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

FAQPage Schema
How do I optimize slow Go code without guessing?

Optimize slow Go code by establishing a baseline with benchmarks, profiling with pprof to identify bottlenecks, and validating each change with benchstat for measurable, evidence-driven performance improvements.

How do I reduce allocations and GC pressure in Go services?

Reduce allocations and GC pressure by applying high-ROI patterns like preallocating slices, using strconv instead of fmt, and running escape analysis to eliminate unnecessary heap allocations on hot paths.

What is the best way to profile Go concurrency bottlenecks?

Profile Go concurrency bottlenecks using pprof and fgprof to diagnose whether the real issue is lock contention, CPU usage, or external I/O, replacing guesswork with profile-driven analysis.

How do I tune http.Transport settings for Go performance?

Tune http.Transport settings and http.Client configurations to reduce connection overhead and improve external I/O throughput, validating the impact with repeated benchmark runs and benchstat comparisons.

Does this Go optimization approach work for containerized services?

Yes, it works for containerized services by applying runtime guardrails like GOMEMLIMIT tuning and verification checklists to keep optimizations safe and effective within memory-constrained environments.

When should I use strings.Builder instead of string concatenation in Go?

Use strings.Builder during hot-path rewrites to avoid repeated memory allocations from string concatenation, validating the allocation reduction through escape analysis and benchmark comparisons.