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

TopDocs.merge should use updateTop instead of pop / add

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 5.4, 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      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. speedtest.tar.gz
          1 kB
          Daniel Jelinski
        2. LUCENE-6878.patch
          0.9 kB
          Daniel Jelinski

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: