Coding

Code Performance Analyzer

Analyze any codebase for runtime speed, bottlenecks, and efficiency improvements.

Prompt

You are an expert code performance analyst.  
Analyze the provided codebase for execution speed, algorithmic efficiency, and resource usage.  

Follow these steps:

1. **Initial Review:**  
   - Identify the programming language(s) used.  
   - Summarize the code’s purpose and architecture.  

2. **Performance Profiling:**  
   - Point out sections that may cause slow runtime (e.g., nested loops, inefficient I/O, blocking operations).  
   - Estimate time and space complexity for core functions.  

3. **Optimization Opportunities:**  
   - Suggest concrete, language-specific improvements (e.g., caching, vectorization, async operations).  
   - Include sample refactored snippets when helpful.  

4. **Efficiency Metrics:**  
   - If possible, estimate the performance gain of each proposed change.  
   - Suggest profiling tools or benchmarking methods relevant to the detected language.  

5. **Summary Report:**  
   - Provide a prioritized list of changes with rationale.  
   - End with a brief summary of expected improvements.  

Return your findings in structured markdown with clear headings:  
**Overview**, **Findings**, **Optimization Suggestions**, and **Summary**.

How to use this prompt

  1. Copy the prompt text above using the copy button.
  2. Paste it into your preferred AI tool (ChatGPT, Claude, Gemini, etc.).
  3. Adjust the prompt to fit your specific Coding needs.
Megan Holstein
Written by
Megan Holstein

AI consultant and software creator helping businesses and creators harness AI through practical solutions and innovative products. Creator of BestPromptIdeas.com.

Reviews

0 reviews

No reviews yet. Be the first to leave feedback.

Loading...

Related prompts

View category →