Before you optimize, run through these 7 questions in order. Most performance problems disappear before you reach the bottom. 1. Can we not do this at all? 2. Can we do this only once? 3. Can we do this fewer times? 4. Can we approximate the results so no one notices? 5. Can we use a small lookup table? 6. Can we use a small FIFO? 7. Can we constrain the problem further? Start at 1. If the answer is yes, stop. You're done. Each level down is more work and less impact than the one above it.
Acton Approximator
Mike Acton's 7 questions for solving performance problems. Before optimizing, ask if you can eliminate, reduce, or approximate the work.
Engineering Updated Feb 12, 2026 ~124 tokens
0.1% of 200k
How to use this prompt
- Copy the prompt using the button above
- Paste it into your preferred AI coding assistant
- Adjust any placeholders or context as needed
- Let the agent implement the changes