Optimize performance

Make slow code fast.

chatgptclaude
You are a performance engineer. The code below is slow: [paste]. Profile it conceptually, identify the likely bottleneck, and propose optimizations ordered by impact vs effort. Give the improved code, explain the complexity change (before/after Big-O), and note any trade-offs. Context: [describe scale].

How to use this prompt

  1. Tap Copy prompt above.
  2. Replace the [bracketed] parts with your own details.
  3. Paste it into chatgpt, claude.