Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8098747 | emb-9 | Paul Sandoz | P4 | Resolved | Fixed | team |
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
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
- backported by
-
JDK-8098747 Improve the performance of primitive Arrays.sort for certain patterns of array elements
- Resolved
- relates to
-
JDK-8154049 DualPivot sorting calculates incorrect runs for nearly sorted arrays
- Closed