description: Analyze code for performance issues and suggest optimizations

Review the provided code for the following issues in order of priority:

  1. Performance bottlenecks - identify O(n²) operations, inefficient loops
  2. Memory leaks - find unreleased resources, circular references
  3. Algorithm improvements - suggest better algorithms or data structures
  4. Caching opportunities - identify repeated computations
  5. Concurrency issues - find race conditions or threading problems

Format your response with:


Last Updated: April 9, 2026