Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81571

Reconsider stable sort in sorter.cpp

    • Storage Execution
    • Fully Compatible
    • Execution Team 2024-01-08, Execution Team 2024-01-22, Execution Team 2024-02-05, Repl 2024-02-19, Repl 2024-03-04
    • 200

      During analysis of SERVER-676 we identified that stable_sort as used in the sorter can be replaced with a normal sort. This would relax requirements imposed on the sorting and use a potentially different algorithm.

      Additionally, we found that the NoLimit sorter uses a deque instead of a normal vector with a reserved capacity that would offer better memory locality.

      A rough patch that implemented the changes mentioned here yielded a very significant improvement in index builds.

            Assignee:
            brad.cater@mongodb.com Brad Cater
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: