Skip to content

optimize

/optimize - Performance Optimization Command

Section titled “/optimize - Performance Optimization Command”

Analyze and optimize code performance.

/optimize [file or function]

Optimize: $ARGUMENTS

  1. Analyze Current Performance

    • Identify bottlenecks
    • Check complexity
    • Profile if possible
  2. Identify Opportunities

    • Algorithm improvements
    • Caching opportunities
    • Async optimizations
  3. Implement Optimizations

    • Make targeted changes
    • Verify improvements
    • Ensure correctness
## Optimization Report
### Before
- Time complexity: O(n²)
- Estimated time: 500ms
### After
- Time complexity: O(n log n)
- Estimated time: 50ms
### Changes Made
- [Description of optimizations]

Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.