performance-optimization
Installation
SKILL.md
Skill: performance-optimization
Measure First — the gate every optimization passes through
Profile before optimizing — intuition about hot spots is measurably wrong more often than right:
- Correctness before speed -- make it work, then make it fast
- <4% of code causes >50% of runtime (Knuth 1971) -- find the hot spot before touching anything
- >50% of optimizations produce negligible or negative results -- measurement prevents wasted effort
Optimization proceeds only from a measurement — unmeasured "optimizations" are edits with a coin-flip chance of helping.
Scope Limitations
This skill covers single-threaded, single-process code tuning for general-purpose computing.