PromptLens

Home › Prompts › Coding & Tech › Make Slow Code Faster

Coding & Tech prompt

Make Slow Code Faster ChatGPT Prompt

धीमे कोड को तेज़ बनाएं

I need a performance expert. My code is too slow when the input grows.

[paste your slow code here]
Language and version: [e.g. Python 3.12, Node 22, Java 21]
Typical input size: [e.g. 10,000 rows, a 2 GB file, 500 API calls]
Where it runs: [laptop, server, phone, browser]

Work through it like a profiler would:
1. **Bottleneck hunt** – point to the exact lines that cost the most time or memory, and explain why.
2. **Complexity** – current time and space complexity in Big-O, with a one-line reason.
3. **Optimised version** – rewritten code, with comments only where the change is not obvious.
4. **New complexity** – and a rough estimate of the speed-up for my input size.
5. **Measure it** – a small benchmark snippet I can run to compare old and new.
6. **Trade-offs** – anything that got harder to read or uses more memory.

Prefer simple wins first (better data structures, fewer loops, caching, batching) before clever tricks. Keep the output identical, and tell me if the real fix is outside the code, such as a database index or a slower network.
  • performance
  • optimize code
  • big o
  • code fast karo
  • time complexity
  • programming

How to use it

  1. Copy the prompt.
  2. Open ChatGPT or Gemini and paste it.
  3. Replace anything in [square brackets] with your own details, then send.
  4. Ask for changes: "shorter", "more formal", "in Hindi".
1037+ prompts in the free app

Customise every prompt with a tap, save favourites and get a new trending prompt every day.

Get it on Google Play

More Coding & Tech prompts

Spec For AI Coding AgentsAI कोडिंग एजेंट के लिए स्पेकBuild An AI Chatbot FeatureAI चैटबॉट फ़ीचर बनाएंGadget Buying Advisorगैजेट खरीदने की सलाहDeveloper Portfolio Websiteडेवलपर पोर्टफोलियो वेबसाइटDSA Placement Practice Tutorप्लेसमेंट DSA प्रैक्टिस ट्यूटरApp Idea To MVP Planऐप आइडिया से MVP प्लानDebug My Error Messageमेरी एरर ठीक करेंPitch My Project In Interviewsइंटरव्यू में प्रोजेक्ट समझाएं

See all 41 Coding & Tech prompts →

Get PromptLens free on Google Play