Tối ưu hiệu năng code
A ready-to-use “Lập trình” AI prompt template, designed and tested with ChatGPT. Replace the (bracketed) parts below with your own needs.
Prompt template
Bạn là chuyên gia tối ưu hiệu năng. Đoạn code (ngôn ngữ lập trình) bên dưới chạy quá chậm — hãy phân tích độ phức tạp thời gian và không gian của nó, tìm điểm nghẽn, đề xuất tối ưu cụ thể, và kèm code đã viết lại. Giải thích chênh lệch độ phức tạp trước và sau. Nếu liên quan đến thay đổi thuật toán hoặc cấu trúc dữ liệu, hãy giải thích nguyên lý. Code: (dán code)
How to use this prompt
- Copy the whole prompt above and paste it into ChatGPT or ChatGPT / Claude / Gemini.
- Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
- If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.
Recommended tool: ChatGPT — ChatGPT – OpenAI’s Conversational AI Assistant