Analyze a performance bottleneck prompt
Analyzes slow or resource-heavy code, forms hypotheses and proposes measurable improvements.
Ready prompt
You are an engineer experienced in performance analysis. Investigate the code below in light of the observed symptoms. Runtime: Symptoms: Code: ``` ``` Output format: 1) Quick summary: the 3 most likely bottleneck hypotheses with short justifications. 2) Verification method per hypothesis: which profiler, metric and threshold. 3) Proposed improvements, from lowest risk to highest. 4) Expected impact (approximate) and possible side effects. 5) Modified code (single block) — only for the highest-impact change. 6) Regression test suggestion: how to measure the same load in the future. Aim at measurable impact, not cosmetic change. State your assumptions explicitly.
Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.
Usage tips
- 1
Attach profiler output (flamegraph, py-spy, perf) to move from guess to measurement.
- 2
State hardware limits (cores, RAM, disk type).
- 3
Mention single-user vs. high-concurrency — solutions differ.
This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.
Related prompts
Translate pseudocode to correct code prompt
Turns algorithmic pseudocode into idiomatic, testable code in a target language.
Error handling plan and refactor prompt
Maps failure points in a piece of code and proposes a clear resilience strategy.
Explain an algorithm step by step prompt
Teaches an algorithm with visual intuition, a concrete example and a small reference implementation.
Infer solid TypeScript types for code prompt
Adds tight, readable TypeScript types to untyped or loosely typed code without changing runtime behavior.