golang-performance

Solid

Go performance optimization techniques including profiling with pprof, memory optimization, concurrency patterns, and escape analysis.

API & Backend 335 stars 29 forks Updated today

Install

View on GitHub

Quality Score: 85/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

Skill Content

# Golang Performance This skill provides guidance on optimizing Go application performance including profiling, memory management, concurrency optimization, and avoiding common performance pitfalls. ## When to Use This Skill - When profiling Go applications for CPU or memory issues - When optimizing memory allocations and reducing GC pressure - When implementing efficient concurrency patterns - When analyzing escape analysis results - When optimizing hot paths in production code ## Profiling with pprof ### Enable Profiling in HTTP Server ```go import ( "net/http" _ "net/http/pprof" ) func main() { // pprof endpoints available at /debug/pprof/ go func() { http.ListenAndServe("localhost:6060", nil) }() // Main application } ``` ### CPU Profiling ```bash # Collect 30-second CPU profile go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30 # Interactive commands (pprof) top10 # Top 10 functions by CPU (pprof) list FuncName # Show source with timing (pprof) web # Open flame graph in browser ``` ### Memory Profiling ```bash # Heap profile go tool pprof http://localhost:6060/debug/pprof/heap # Allocs profile (all allocations) go tool pprof http://localhost:6060/debug/pprof/allocs # Interactive commands (pprof) top10 -cum # Top by cumulative allocations (pprof) list FuncName # Show allocation sites ``` ### Programmatic Profiling ```go import ( "os" "runtime/pprof" ) func profileCPU() { ...

Details

Author
aiskillstore
Repository
aiskillstore/marketplace
Created
5 months ago
Last Updated
today
Language
Python
License
None

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

golang-performance

Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (see golang-benchmark skill) or debugging workflow (see golang-troubleshooting skill).

1,904 Updated 3 days ago
samber
AI & Automation Listed

golang-performance

Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (see golang-benchmark skill) or debugging workflow (see golang-troubleshooting skill).

0 Updated today
guynhsichngeodiec
Data & Documents Listed

profile

Run CPU and memory profiling with pprof to identify performance hotspots. Use when investigating high resource usage.

21 Updated 1 months ago
PeterBooker
Testing & QA Solid

golang-pro

Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming, microservices architecture, or high-performance systems. Invoke for goroutines, channels, Go generics, gRPC integration, CLI tools, benchmarks, or table-driven testing.

9,537 Updated 1 weeks ago
Jeffallan
AI & Automation Listed

golang-pro

Use when building Go applications requiring concurrent programming, microservices architecture, or high-performance systems. Invoke for goroutines, channels, Go generics, gRPC integration.

2 Updated today
zacklecon