description: Analyze code for performance issues and suggest optimizations
Code Optimization
Review the provided code for the following issues in order of priority:
- Performance bottlenecks - identify O(n²) operations, inefficient loops
- Memory leaks - find unreleased resources, circular references
- Algorithm improvements - suggest better algorithms or data structures
- Caching opportunities - identify repeated computations
- Concurrency issues - find race conditions or threading problems
Format your response with: - Issue severity (Critical/High/Medium/Low) - Location in code - Explanation - Recommended fix with code example
Last Updated: April 9, 2026