DualPivotQuicksort webrev for JDK-8080945 (original) (raw)

Rezaei, Mohammad A. Mohammad.Rezaei at gs.com
Tue May 26 01:32:11 UTC 2015


Stefan, you're looking at an older version of the code. If you apply Paul's suggestions from http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-May/033640.html the code works as expected.

Thanks Moh

-----Original Message----- From: core-libs-dev [mailto:core-libs-dev-bounces at openjdk.java.net] On Behalf Of Stefan Zobel Sent: Monday, May 25, 2015 11:23 AM To: core-libs-dev at openjdk.java.net Subject: DualPivotQuicksort webrev for JDK-8080945

Hi all,

Unless I'm doing something immensely stupid, the DualPivotQuicksort proposal in http://cr.openjdk.java.net/~psandoz/tmp/gs/sort/webrev.2/ doesn't work for me. This little program public static void main(String[] args) { int[] a = new int[287]; for (int i = 0; i < a.length; i++) { a[i] = -((i % 143) + 1); } System.out.println(Arrays.toString(a)); DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); }

sends the sort into an infinite loop. Something wrong with the test?? Stefan



More information about the core-libs-dev mailing list