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

Make SorterTemplate.mergeSort run in linear time on sorted arrays

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 4.3
    • None
    • None
    • New

    Description

      Through minor modifications, SorterTemplate.mergeSort could run in linear time on sorted arrays, so I think we should do it? The idea is to modify merge so that it returns instantly when compare(pivot-1, pivot) <= 0.

      Attachments

        1. LUCENE-4875.patch
          5 kB
          Adrien Grand

        Activity

          People

            jpountz Adrien Grand
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: