This skill empowers Claude to identify and refactor performance bottlenecks in Go applications by applying distilled best practices from Google, Uber, and the Go community. It focuses on high-impact optimizations for the 'hot path,' such as efficient string handling with strconv, pre-allocating slice and map capacities to minimize garbage collection pressure, and selecting optimal string concatenation strategies. By integrating benchmarking scripts and profiling guidance, it ensures that every code optimization provides measurable performance gains without sacrificing idiomatic Go style.
主要功能
01Automated benchmarking and result comparison using benchstat scripts
02Optimized string concatenation strategies including strings.Builder
03Performance-aware pass-by-value vs. pointer logic for function arguments
04Memory allocation reduction via map and slice capacity hints
0577 GitHub stars
06High-speed primitive conversions using strconv over fmt
使用场景
01Validating code changes with automated micro-benchmarks and performance comparisons
02Reducing latency and CPU usage in high-traffic Go API endpoints
03Refactoring memory-intensive loops to minimize garbage collection overhead