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

Investigate use of merging algorithm for ordered multi accumulators

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • QE 2021-11-15

      Currently, AccumulatorN::processInternal naively combines elements one at a time when merging partial results (e.g inserting each element one at a time). For $firstN/$lastN, this is ok, but in the case of the ordered accumulators, we can potentially improve this using the 'merge sorted lists' algorithm. This task should investigate whether this algorithm provides any perf benefits (we should explore this after we have perf coverage for all of the ordered accumulators).

      For small 'n' (i.e. n <= 10), this might not make a big difference, but for larger 'n', it could save some work.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: