Performance Code Review
Analyze code for performance issues at the right scale — no micro-optimizations on cold paths.
performancecode-reviewdevelopmentchatgpt
Prompt
Analyze this {{language}} code for performance issues: ``` {{paste your code}} ``` Context: This code runs {{frequency}} (e.g., "on every API request", "in a batch job processing 1M records", "on page load"). Check for: - Unnecessary allocations or copies - N+1 query patterns - Missing caching opportunities - Algorithmic complexity issues (O(n^2) when O(n) is possible) - Blocking operations that could be async For each issue, estimate the impact (high/medium/low) and provide an optimized version. Only flag issues that matter at the stated scale — don't micro-optimize code that runs once.
Variables to customize
{{language}}{{paste your code}}{{frequency}}
Why this prompt works
The frequency context prevents ChatGPT from micro-optimizing cold code paths. 'Only flag issues that matter at the stated scale' keeps recommendations practical.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Code Review Assistant
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Code Review with Specific CriteriaGet focused code review feedback with numbered criteria that works on both ChatGPT and Claude.
Explain Complex CodeGet a clear, leveled explanation of any code snippet — calibrated to your experience level.
Debug with ContextSystematic debugging prompt that includes context, error details, and what you've already tried.