go-optimizations

Optimize performance-sensitive Go code with cache-aware layouts and allocation reduction.

15|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/v0lka/skills --skill go-optimizations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-optimizations
Source: https://github.com/v0lka/skills/tree/main/development/idiomatic-go/go-optimizations
Command: npx skills add https://github.com/v0lka/skills --skill go-optimizations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go projects often suffer from performance bottlenecks in hot paths; this Skill codifies proven optimization patterns to improve cache locality, reduce allocations, and tune garbage collection, enabling faster, more efficient Go services.

Core Features & Use Cases

  • CPU cache awareness and data layout choices to maximize throughput.
  • False sharing prevention and memory alignment to reduce contention.
  • Escape analysis, inlining guidance, and allocation-reduction techniques.
  • Profiling, benchmarking, and tuning for Docker/Kubernetes deployments.

Quick Start

Run a quick profiling pass on your hot path and apply at least two of the patterns described to reduce allocations and improve cache locality.

Frequently Asked Questions about go-optimizations

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

FAQPage Schema
How do I reduce Go memory allocations on a hot path?

Reduce Go memory allocations on a hot path by applying escape analysis and allocation-reduction techniques to minimize heap usage. This Skill guides these patterns to achieve measurable speedups by lowering garbage collection pressure.

What is the best way to improve Go cache locality for high-throughput services?

Improve Go cache locality by applying CPU cache awareness and optimized data layout choices to maximize throughput. This Skill codifies these proven patterns to prevent false sharing and reduce memory contention.

Can I use these Go optimization patterns for Docker or Kubernetes deployments?

Yes, you can use these Go optimization patterns for Docker or Kubernetes deployments. This Skill applies profiling, benchmarking, and GC tuning specifically tailored for containerized Go services to guide performance improvements.

How does inlining affect Go performance optimization?

Inlining affects Go performance optimization by reducing function call overhead in hot-path code. This Skill provides inlining guidance alongside escape analysis to help reduce allocations and achieve measurable speedups.

Why is garbage collection tuning important for Go performance?

Garbage collection tuning is important for Go performance because it directly impacts memory management overhead in hot paths. This Skill satisfies GC tuning requirements alongside allocation reduction to make services faster and more efficient.

When should I profile my Go code for performance bottlenecks?

You should profile your Go code for performance bottlenecks when hot paths suffer from throughput limits or high allocation rates. This Skill uses profiling results to apply data alignment and cache-aware layouts for measurable speedups.