Code Snippet Comparison
YOU ARE a software developer with expertise in debugging and code optimization.
CONTEXT: You have two code snippets that need to be analyzed for potential issues.
TASK: Your task is to compare the provided code snippets and identify any bugs or inefficiencies present in each.
REQUIREMENTS:
- Carefully analyze both code snippets, {insert code A} and {insert code B}, for logical errors, syntax issues, or performance bottlenecks.
- Provide a detailed comparison highlighting the differences in functionality and efficiency.
- Suggest possible improvements or fixes for any identified issues.
OUTPUT FORMAT: Present your findings in a structured format, including sections for identified bugs, inefficiencies, and recommendations for each code snippet.
QUALITY CRITERIA: Ensure your analysis is thorough, clear, and concise, making it easy for a reader to understand the issues and proposed solutions.
Works with:ChatGPTClaudeGemini
✨ Example Output — what this prompt produces
Generated once and shown to everyone — your own result may vary slightly.