Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CortexLM/cortex-code
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: CortexLM/cortex-code
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/async-queue-pop-performance-5390
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 4, 2026

  1. fix(engine): use VecDeque for AsyncQueue pop to achieve O(1) complexity

    Replace Vec with VecDeque in AsyncQueue to improve pop() performance
    from O(n) to O(1). Vec::remove(0) requires shifting all remaining
    elements, while VecDeque::pop_front() operates in constant time.
    
    This addresses a performance issue where AsyncQueue pop operations
    would become increasingly slow as queue size grows, particularly
    problematic in high-throughput scenarios.
    
    Changes:
    - Replace Vec<T> with VecDeque<T> for internal storage
    - Use push_back() instead of push() for consistency
    - Use pop_front() instead of remove(0) for O(1) dequeue
    
    Fixes: issue #5390
    echobt committed Feb 4, 2026
    Configuration menu
    Copy the full SHA
    65de54c View commit details
    Browse the repository at this point in the history
Loading