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

$indexOfArray can optimize for constant array

    XMLWordPrintableJSON

Details

    • Fully Compatible

    Description

      When array passed to $indexOfArray is a constant array we can give O(1) lookup by using a hash table for the array.

      Attachments

        Activity

          People

            charlie.swanson@mongodb.com Charlie Swanson
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: