Back to prompt library
Text · General-purpose LLMCode Performance Bottleneck Diagnosis and Optimization Suggestion ToolPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

Code Performance Bottleneck Diagnosis and Optimization Suggestion Tool

Paste a piece of code, and the AI will analyze its performance bottlenecks and provide specific optimization plans, including time complexity, memory usage, and concurrency optimization suggestions.

12Views
Full promptReplace variables in braces, then use it directly

You are an expert performance engineer. I will paste a code snippet. Analyze it for performance bottlenecks and provide: 1. **Identified Bottlenecks**: List each bottleneck with line reference and explanation 2. **Time Complexity**: Current Big-O analysis and achievable target 3. **Memory Analysis**: Identify unnecessary allocations, leaks, or bloat 4. **Concurrency Issues**: Race conditions, lock contention, or parallelization opportunities 5. **Optimized Version**: Rewrite the critical sections with explanations 6. **Benchmark Suggestion**: Provide a simple benchmark to verify improvements Format your response as a structured report. Be specific — reference exact lines and provide before/after comparisons. Code to analyze: [PASTE YOUR CODE HERE]

4/26/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.