Code prompts
Code prompt

Performance review of this code or query

It's slow. You want a real diagnosis, not "use a cache."

Works best in: Claude

Review this for performance. Don't suggest "use a cache" unless it's actually the right answer.

Code or query:
```{{language or SQL}}
{{paste code/query}}
```

Context:
- What it does: {{one sentence}}
- Current performance: {{how slow, on what data size}}
- Where it runs: {{API endpoint? batch job? client-side?}}

Walk me through:
1. **The actual hot path** — what's taking the time? (N+1, big-O, network, IO, allocation, etc.)
2. **The minimal change** that gets the biggest win — one thing, measurable
3. **Bigger restructuring** worth considering, with tradeoffs
4. **What would 10x'ing the input size break first?** Be specific.
5. **Tools to confirm** — how do I actually measure this rather than guess?

Be honest if the code is fine and I'm optimizing prematurely.
·Open in·Share
performanceoptimizationprofiling

More code prompts

All code prompts

Go deeper