Improve the performance of primitive Arrays.sort for certain patterns of array elements

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b69

        When sorting an array of primitive elements the array is first analysed to see if it is nearly sorted (or actually is sorted). If nearly sorted then an optimized merge sort is performed, otherwise a dual pivot quick sort is performed.

        Improvements can be made to the this analysis of the array to better identify nearly sorted cases, such as detecting patterns that consist of equals then ascending or descending elements, and descending then ascending elements. More details can be found in the following email thread:

          http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-May/033138.html

              Assignee:
              Paul Sandoz
              Reporter:
              Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: