Measure Before Optimising
No guessing at slow
Partial · ChatGPT, Pro · September 27, 2026
What it does
Refuses to speed anything up until there is a number, a way to reproduce it, and a target — then only lets it touch the one slow part.
When to use it
Something is “slow” and somebody is about to start rewriting.
The prompt
Paste it, then fill in the <angle brackets>
CONTEXT
This is slow: <what, where, how slow, with how much data>.
RULES
- No changes to anything until step two is done.
- Step one: give me the exact command that measures it, and
the number it gives right now.
- Step two: name the single slowest step, and show me the
proof it is that one. Not a hunch.
- Change only that step. Measure again. Stop.
DONE MEANS
- A before number and an after number, measured the same way.
- The target was said out loud first, and you either hit it
or say plainly that you did not.
- Nothing else behaves differently: the old tests still pass,
and you show me that.
LAY IT OUT LIKE THIS
1. The measuring command, and the before number
2. The slowest step, and the proof
3. What you changed
4. The same measuring command, and the after number
5. The tests: command and outputWays to use it
- If it cannot give you a before number, the problem is not defined yet
- Paste in what the database says it is doing and make it read it back
- Aim lower than you need — you get one shot at this per change
Test log
Each prompt was pasted into a fresh private chat with memory off and graded against pass standards written before the run (all of them, dated).
| Date | Tool | Model | Result | What happened |
|---|---|---|---|---|
| September 27, 2026 | ChatGPT | Pro | Partial | Chat window, no code run: used the pasted 2,145 ms, proved the seq scan was the slow step, proposed one partial index and gave no invented after number; it set no numeric target. |
The pass standard for this prompt: six criteria and an automatic-fail rule, written down on September 27, 2026, before any run. A second version for a reworded prompt was written on September 28, 2026; nothing has been graded against it yet.
Related words
- success criteria — The things you can actually watch happen that tell you the job is finished.
- yak shaving — A chain of one-more-thing-first jobs that carries you further and further from what you sat down to do.