golang-performance

Profile Golang applications with pprof to identify performance bottlenecks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the need for performance optimization in Golang codebases, focusing on reducing bottlenecks and improving runtime efficiency.

Core Features & Use Cases

  • Profiling-Driven Optimization: Guides users to identify actual hot spots using pprof and runtime diagnostics before applying micro-optimizations.
  • Best Practices & Patterns: Offers strategic advice on reducing allocations, improving cache locality, avoiding false sharing, and leveraging SIMD and inlining.
  • Use Case: A developer notices increased latency; this Skill helps systematically diagnose whether the issue is memory, CPU, I/O, or algorithmic, then suggests targeted improvements.

Quick Start

Request optimization recommendations for a Go microservice with high CPU usage and memory growth.

Frequently Asked Questions about golang-performance

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

FAQPage Schema
How do I identify Golang performance bottlenecks using profiling?

Golang performance bottlenecks are identified using pprof and runtime diagnostics to detect actual hot spots before applying micro-optimizations. This approach analyzes memory, CPU, I/O, or algorithmic issues to ensure targeted improvements in complex production environments.

What is the best way to reduce memory allocations in Go microservices?

The best way to reduce memory allocations in Go is by applying proven performance patterns that improve cache locality and leverage inlining. Profiling-driven optimization identifies allocation hot spots, enabling targeted improvements that reduce runtime memory growth.

How do I optimize concurrent Golang code to address false sharing?

Optimizing concurrent Golang code to address false sharing involves applying strategic patterns that improve cache locality across goroutines. Performance profiling validates these concurrent code changes using benchmarks and diagnostic tools in complex production environments.

Can I use this approach to diagnose high CPU usage and latency in Go production environments?

Yes, you can use this approach to diagnose high CPU usage and latency in Go production environments. It systematically determines whether the root cause is memory, CPU, I/O, or algorithmic, then suggests targeted improvements validated by benchmarks.

When should I not apply micro-optimizations to Golang applications?

You should not apply micro-optimizations to Golang applications before identifying actual hot spots using pprof and runtime diagnostics. Validating changes with benchmarks and diagnostic tools prevents premature optimization in complex production environments.

Does Golang performance optimization require benchmark validation for cache locality improvements?

Golang performance optimization requires benchmark validation to ensure cache locality improvements and reduced allocations are effective. Diagnostic tools verify that changes addressing false sharing and leveraging SIMD actually resolve the identified bottlenecks.