Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8080945

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs
    • None
    • b69

    Backports

      Description

        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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: