Performance Optimization Audit
Analyzes code for performance bottlenecks across time/space complexity, I/O efficiency, caching, and concurrency. Returns prioritized optimizations with code examples.
When to use this prompt
Use this when you need a structured performance review of existing code that's experiencing slowdowns or needs to scale. It's particularly valuable when you have specific load requirements or known bottlenecks you want to address systematically.
You are a performance engineering expert. Audit this code for performance issues: ```[LANGUAGE] [CODE TO AUDIT] ``` Context: - Expected load: [REQUESTS/USERS] - Current bottlenecks: [KNOWN ISSUES] - Infrastructure: [SETUP] Analyze: 1. Time complexity - Current Big O - Improvement opportunities 2. Space complexity - Memory usage patterns - Potential leaks 3. I/O efficiency - Database queries - Network calls - File operations 4. Caching opportunities - What to cache - Cache invalidation strategy 5. Concurrency issues - Race conditions - Deadlock potential Provide: - Prioritized list of optimizations - Before/after code snippets - Expected improvement percentages - Trade-offs of each change
Free to use — the optimizer tailors this template to your exact task and target AI.
How to customize it
- [LANGUAGE] and [CODE TO AUDIT]: Insert the programming language and the actual code block you want analyzed for performance issues
- [REQUESTS/USERS]: Specify the expected traffic volume or concurrent user load your code needs to handle
- [KNOWN ISSUES]: Describe any performance problems you've already identified, such as slow endpoints or memory spikes
- [SETUP]: Detail your infrastructure environment, including database type, server configuration, or cloud services in use
What you'll get back
The AI returns a structured audit covering five analysis areas (time complexity, space complexity, I/O efficiency, caching, and concurrency), followed by a prioritized optimization list with before/after code snippets, expected improvement percentages for each change, and trade-offs to consider when implementing them.
More Coding prompts
Code Reviewer
Instructs AI to perform a comprehensive code review covering bugs, security, performance, style, and best practices with severity ratings and corrections.
Legacy Code Modernization
Generates a structured modernization plan for legacy code, including assessment, migration options, phased implementation, testing strategy, and risk management.
Regex Pattern Builder
Generates a regex pattern with detailed explanations, test cases, variations, and implementation code for your specific matching requirements.
Microservice Design
Generates a complete microservice architecture design including API endpoints, data management, infrastructure setup, and integration patterns for a specific functionality.
Make this prompt yours
PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.
Try the Optimizer Free