golang-performance

Apply Go performance optimization patterns to profiling-identified bottlenecks.

Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Utchash007/TermTales --skill golang-performance-utchash007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-performance
Source: https://github.com/Utchash007/TermTales/tree/main/.agents/skills/golang-performance
Command: npx skills add https://github.com/Utchash007/TermTales --skill golang-performance-utchash007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Golang performance optimization patterns help identify and apply targeted improvements when profiling shows bottlenecks, covering allocations, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization.

Core Features & Use Cases

  • Profiling-guided patterns: select the right optimization pattern after measuring hot paths with pprof, benchmarks, and traces.
  • Code-review enhancements: provide concrete, measurable improvements during performance reviews by focusing on allocations, inlining, and cache locality.
  • Use Case: imagine a Go HTTP server facing high latency; apply one pattern at a time (e.g., preallocations, sync.Pool, reducing allocations) and re-measure to validate gains.

Quick Start

Profile the target Go code, then apply one pattern at a time and re-measure to verify improvements.

Frequently Asked Questions about golang-performance

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

FAQPage Schema
How do I optimize Go performance bottlenecks using profiling data?

To optimize Go performance, you apply targeted patterns like preallocation, sync.Pool, and GC tuning to bottlenecks identified by pprof benchmarks and traces, validating improvements by re-measuring hot paths.

What is the best way to reduce allocations in a high-latency Go HTTP server?

The best way to reduce allocations in a Go HTTP server is applying one optimization pattern at a time, such as preallocations or sync.Pool, and re-measuring to validate latency gains.

Can I improve cache locality and memory layout in Go without built-in profiling?

Improving cache locality and memory layout in Go requires profiling data to drive pattern selection. You need pprof benchmarks or traces to identify hot paths and validate measurable improvements.

How do I tune Go garbage collection for hot-path optimization?

Go GC tuning for hot-path optimization involves selecting specific patterns after profiling shows bottlenecks, applying adjustments, and running benchmarks to verify improvements.

When do I need profiling-driven optimization for my Golang project?

You need profiling-driven optimization for Go projects when measurable bottlenecks appear in CPU efficiency, memory layout, or allocations, requiring pprof traces to guide and validate pattern selection.

Why should I apply Go performance patterns one at a time?

Applying Go performance patterns one at a time ensures accurate validation of improvements. Re-measuring after each change isolates the impact of specific optimizations like caching or inlining.