PhraseryPhrasery homeGet Phrasery
Code review & debugging21 categories

Find why this is slow

Something is sluggish and you don't yet know what to measure.

This code is slower than it should be. Help me find out why before I optimise anything.

1. What is the algorithmic complexity, and what dominates as input grows?
2. Where are the hidden costs โ€” allocations in a loop, repeated work, N+1 queries, re-renders, synchronous I/O?
3. Which of these would actually matter at my scale? Ask me for the input size if you need it.
4. What should I measure first to confirm, and how?

Rank fixes by (impact รท effort). Explicitly tell me which optimisations are not worth doing.

Code:

Making it yours

  • Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
  • Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
  • If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.

Chasing down a bug. Finding the cause when something fails, runs slow, or will not reproduce locally.

Related prompts

Keep this one

Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.

Add to your browser โ€” free