Use when code has performance issues, slow execution, high memory usage, nested loops, timeout errors, TLE, or fails performance benchmarks. Also use for algorithm complexity analysis, data structure optimization, or when user mentions Big O, O(n^2), time/space complexity, performance tuning, optimize, speed up code in C++, Java, or Python.
Use when code has performance issues, slow execution, high memory usage, nested loops, timeout errors, TLE, or fails performance benchmarks. Also use for algorithm complexity analysis, data structure optimization, or when user mentions Big O, O(n^2), time/space complexity, performance tuning, optimize, speed up code in C++, Java, or Python.