Optimizing Java using D
safety0ff via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 20 18:07:19 PDT 2014
On Friday, 20 June 2014 at 23:34:32 UTC, Walter Bright wrote:
> http://www.reddit.com/r/programming/comments/28mp3m/the_magic_forest_problem_revisited_optimising/
>
> The article indicates there may be a performance problem with
> std.algorithm.sort
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.
More information about the Digitalmars-d
mailing list