Back to prompts
Analyse and optimise the following code for performance: ``` [paste your code here] ``` Language / runtime: [e.g. Node.js / Python 3.11 / browser JavaScript] Current performance issue: [e.g. slow response times / high memory usage / blocking the event loop] Scale context: [e.g. runs 1000x/day / handles 10k concurrent users / processes 1GB files] Provide: 1. Analysis: identify all performance bottlenecks with explanation of why each is slow 2. Optimised version: rewrite with improvements applied 3. Explanation: for each change, explain what was done and the expected impact 4. Benchmarking suggestion: how to measure the before/after improvement 5. Further optimisations: mention any additional gains possible with infrastructure changes or different approaches
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.