performance
Installation
SKILL.md
Performance Optimization
Performance work follows one rule: measure before you change anything. Intuition about bottlenecks is wrong more often than right. Every optimization starts with profiling, forms a hypothesis, applies a targeted fix, and ends with another measurement.
Core principles
| Principle | Meaning |
|---|---|
| Measure first | Never optimize without profiling data. Gut feelings about bottlenecks are unreliable |
| Optimize the critical path | Focus on the code that runs most often or blocks user-visible latency |
| Set budgets | Define acceptable latency, throughput, and resource usage before you start |
| Avoid premature optimization | Write readable, correct code first. Optimize only when measurements show a real problem |
| Know the tradeoffs | Every optimization costs something (memory for speed, complexity for throughput, freshness for latency) |
Profiling and benchmarking
Profiling shows where time and resources go. Without it you are guessing.