Optimizing Java using D

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 20 18:30:57 PDT 2014


safety0ff:

> I just tested his code, std.algorithm.sort with 
> SwapStrategy.stable is much faster than his quicksort.
>
> std.algorithm.sort with SwapStrategy.unstable is considerably 
> slower than his, whereas builtin sort is  abysmal.
>
> I find that generally using SwapStrategy.stable performs better.
> This isn't universal though as there are cases where it is 
> slower.

The attention span of Reddit is excessively small, so corrections 
often seem ignored, but if you have tested the D code, then I 
suggest you to also compare the timings of the C++ version(s) on 
the same computer and post the two (or more) timings in that 
Reddit thread. Decreasing a bit the bad advertising that is 
floating around about D doesn't hurt :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list