Dual-Pivot Quicksort and Sorting classes: update

Vladimir Iaroslavski iaroslavski at mail.ru
Wed Aug 11 13:38:18 UTC 2010


Hello!

I updated Dual-Pivot Quicksort and Sorting classes.

http://cr.openjdk.java.net/~alanb/6976036/webrev

In compare with previous version the ratio (JDK 7 / JDK 6)
now is (client / server): 54.35% / 42.79% (was 57.22% / 46.18%).

Summary of changes:

Sorting class: new type of test (check sum with plus operation) was added.
Dual-Pivot Quicksort:

1. Changes in for-loop from

for (int i = <lo> + 1; i < <hi>; i++)

to

for (int i = <lo>; ++i < <hi>; )

2. Skip the longest ascending sequence in insertion sort:

while (left <= right && a[left - 1] <= a[left]) {
     left++;
}

3. Added comment about a[i]; i++; issue.

4. Corrected comment with value when sqan of equal to
pivots is started: 5/7 -> 4/7.

5. Other minor javadoc changes.

Please review the changes.

Thank you,
Vladimir



More information about the core-libs-dev mailing list