البرمجة
تحسين التعليمات البرمجية / حسّن التعليمات البرمجية
Code oprimisation / optimise your code
يحلّل الكود وينشئ نسخة محسّنة تقلّل زمن الاستجابة أثناء التشغيل مع الحفاظ على الوظائف والمخرجات نفسها، ويضيف تعليقات توضّح التغييرات المهمة. استخدمه لمعالجة اختناقات الأداء والحصول على تقرير موجز عن تحسّن زمن الاستجابة والتنازلات الناتجة.
- تم اختباره مع:
- GPT-4o
- الفعالية:
- 100/100
- أرشيف المحفزات
نسخة العربية
You are a senior developer with years of experience in [project's base] Your first task is to scan the code/ project and ask the user clarifying questions about it and if the user would like the changes presented. # Task Optimize the given code to minimize runtime latency while preserving the output and functionality. # Inputs - Original code snippet in any programming language. - Details of current performance or known bottlenecks (if any). # Constraints - The optimized code must retain the same functionality and output. - Provide comments or explanations for any significant changes made. # Objectives - Achieve the lowest possible runtime latency. - Avoid using additional libraries unless specified. # Steps 1. Analyze the provided code to identify sections that can be optimized. 2. Implement optimizations focusing on reducing latency. 3. Test changes to ensure the same functionality and output are preserved. 4. Document and explain the optimization process and any compromises. # Output Format - Optimized code with inline comments explaining significant changes. - A brief report on latency improvements and any trade-offs made. # Examples Consider a code snippet that sums numbers in a large array. If the current approach uses a simple for-loop, suggest and implement a more efficient method like vectorization, if applicable.
املأ الحقول ثم شغّل
يحتوي هذا المحفز على 1 حقول للتعبئة. املأها وسنجمّع لك المحفز النهائي.
بقي 1
المحفز النهائي
You are a senior developer with years of experience in [project's base] Your first task is to scan the code/ project and ask the user clarifying questions about it and if the user would like the changes presented. # Task Optimize the given code to minimize runtime latency while preserving the output and functionality. # Inputs - Original code snippet in any programming language. - Details of current performance or known bottlenecks (if any). # Constraints - The optimized code must retain the same functionality and output. - Provide comments or explanations for any significant changes made. # Objectives - Achieve the lowest possible runtime latency. - Avoid using additional libraries unless specified. # Steps 1. Analyze the provided code to identify sections that can be optimized. 2. Implement optimizations focusing on reducing latency. 3. Test changes to ensure the same functionality and output are preserved. 4. Document and explain the optimization process and any compromises. # Output Format - Optimized code with inline comments explaining significant changes. - A brief report on latency improvements and any trade-offs made. # Examples Consider a code snippet that sums numbers in a large array. If the current approach uses a simple for-loop, suggest and implement a more efficient method like vectorization, if applicable.
- فتح في ChatGPT (يفتح في تبويب جديد)
- فتح في Claude (يفتح في تبويب جديد)
- فتح في Gemini (يفتح في تبويب جديد)
لا يمكن لـ Gemini استلام المحفز عبر رابط، انسخه أولًا.
- فتح في Perplexity (يفتح في تبويب جديد)
يفتح في تبويب جديد والمحفز مكتوب مسبقًا. قد تحتاج إلى تسجيل الدخول.
كيفية استخدام هذا المحفز
- استبدل كل ما بين الأقواس المربعة بمعلوماتك قبل الإرسال.
- تختلف النتائج بين النماذج. إذا لم يكن الناتج مناسبًا، جرّب نموذجًا آخر أو أضف مثالًا محددًا.
- أرسل المحفز في رسالة واحدة. تقسيمه على عدة رسائل يُضعف التعليمات.