RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v8]

Laurent Bourgès lbourges at openjdk.org
Wed Aug 30 09:31:06 UTC 2023


> * improved  mixed insertion sort (makes whole sorting faster)
> * introduced Radix which sort shows several times boost of performance and has linear complexity instead of n*ln(n)
> * improved merging sort for almost sorted data
> * optimized parallel sorting
> * improved step for pivot candidates and pivot partitioning
> * extended existing tests
> * added benchmarking JMH tests
> * suggested better buffer allocation: if no memory, it is switched to in-place sorting with no OutOfMemoryError, threshold is 1/16th heap
> 
> I am going on previous PR by Vladimir Yaroslavskyi: https://github.com/openjdk/jdk/pull/3938

Laurent Bourgès has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:

 - Merge branch 'openjdk:master' into dpqs23
 - Merge branch 'dpqs23' of github.com:bourgesl/jdk-official into dpqs23
 - Merge branch 'openjdk:master' into dpqs23
 - simplified test to enable radix sort (improved sorting on period and shuffle data) + updated version to 22
 - fixed javadoc and size renamed to length for clarity
 - improved and more obvious max length test to always respect max heap memory footprint
 - Merge branch 'openjdk:master' into dpqs23
 - rewritten radix sort condition + fixed max buffer size
 - optimized radix sort heuristic
 - JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort)
       * Optimized mixed insertion sort
       * Optimized insertion sort
       * Optimized Radix sort
       * Updated microbenchmark

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/13568/files
  - new: https://git.openjdk.org/jdk/pull/13568/files/f7f7e11a..1d6d69d7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13568&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13568&range=06-07

  Stats: 491505 lines in 7445 files changed: 306730 ins; 129358 del; 55417 mod
  Patch: https://git.openjdk.org/jdk/pull/13568.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13568/head:pull/13568

PR: https://git.openjdk.org/jdk/pull/13568


More information about the core-libs-dev mailing list