Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6878

TopDocs.merge should use updateTop instead of pop / add

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 6.0
    • 5.4, 6.0
    • core/search
    • None
    • New

    Description

      The function TopDocs.merge uses PriorityQueue in a pattern: pop, update value (ref.hitIndex++), add. JavaDocs for PriorityQueue.updateTop say that using this function instead should be at least twice as fast.

      Attachments

        1. LUCENE-6878.patch
          0.9 kB
          Daniel Jelinski
        2. speedtest.tar.gz
          1 kB
          Daniel Jelinski

        Activity

          People

            jpountz Adrien Grand
            djelinski Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: