Avoiding Unnecessary Work

•
1
•

Applies canonical performance optimization guidance from Jeff Dean and Sanjay Ghemawat to eliminate redundant computations, optimize hot paths, and boost code efficiency.

The Avoiding Unnecessary Work skill equips Claude Code with battle-tested performance principles from Google systems pioneers Jeff Dean and Sanjay Ghemawat. It guides agents and developers in systematically auditing and refactoring bottlenecks by introducing fast paths, hoisting loop invariants, precomputing and deferring expensive operations, specializing code, leveraging caching, and stripping stats and logging overhead from hot execution paths.

主要功能

01Compiler optimization guidance and code specialization
02Hot path optimization through fast-path conditional execution
03Hot path logging and statistics overhead reduction
04Loop optimization via invariant hoisting and precomputation
05Deferred execution and intelligent caching implementation
061 GitHub stars

使用场景

01Refactoring latency-sensitive API backend endpoints and services
02Reducing telemetry, stats collection, and logging overhead in critical paths
03Optimizing CPU-intensive algorithms and batch processing loops