New portion of improvements for Dual-Pivot Quicksort

Vladimir Iaroslavski iaroslavski at mail.ru
Fri Jun 18 13:07:43 UTC 2010


Hello,

Here is next piece of improvements, see attached class.
It is surprise but code

a[less++] = ak;

works slower (client VM) than

a[less] = ak;
less++;

In general, we save about about 1% on Bentley's test suite.
Also I eliminate additional check of indexes k and less:

if (k != less) {
   // swap a[k] and a[less]
}
For long type it gives additional one percent and works the same
for other types.

If you don't have any comments/suggestions, I'm going to integrate
the code into JDK repository on the next week.

Thanks,
Vladimir

Vladimir Iaroslavski wrote:
> Hello,
> 
> Here is the latest version of Dual-Pivot Quicksort with minor javadoc changes.
> 
> Does anybody have comments/suggestions/improvements?
> 
> Thank you,
> Vladimir
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DualPivotQuicksort.java
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20100618/b048e230/DualPivotQuicksort.java>


More information about the core-libs-dev mailing list