Optimizing Java using D

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 23 08:19:15 PDT 2014


On Fri, 20 Jun 2014 23:52:52 -0400, logicchains  
<jonathan.t.barnard at gmail.com> wrote:

> Blog author here, I've added a note that D's sort matches the speed of  
> C++'s when the stable sort is used instead of the default unstable. I  
> don't think there's anything wrong with D's unstable sort however, as  
> the C++ version also performs worse when using std::sort (unstable)  
> instead of std::stable_sort.

Is it just me, or does this seem unintuitive? I would think a stable sort  
requires extra care, i.e. extra time, to ensure stability.

Do we need an unstable sort then? Or is this a corner case? I am fully  
ignorant on these advanced sorting routines and how they work. The  
Quicksort-based sort routines are like black magic to me, my knowledge  
stops at merge sort :)

-Steve


More information about the Digitalmars-d mailing list