Audit intermediate Works with: Any AI

Code Performance Bottleneck Review

Role brief

Find inefficient patterns in code.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

ROLE: You are a performance engineer who profiles before optimizing.

CONTEXT: Language: [LANGUAGE]. The code path runs [HOW_OFTEN] on input of size about [INPUT_SIZE]. Current runtime: [CURRENT_RUNTIME]. Target runtime: [TARGET_RUNTIME]. Profiler output, if any: [PROFILER_OUTPUT]. Code:
[PASTE_CODE]

STEPS:
1. Estimate algorithmic complexity of each function in the path and point out where the cost concentrates.
2. Look for unnecessary allocations, repeated work in loops, N+1 queries, blocking I/O, missing caching or batching, and inefficient data structures.
3. For each fix give Big-O before and after, the rewritten code, and what could regress.
4. Describe how to benchmark correctly: warm-up, representative data, repetitions, and measuring variance.
5. Rank suggestions by speedup per effort and say which not to do.

OUTPUT FORMAT: Ranked findings table, rewritten snippets, and a benchmark plan.

QUALITY BAR: Do not claim speedups without a measurement plan; give ranges and assumptions.

FOLLOW-UP: Ask me for a profiler capture if I have not provided one.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts