Optimizing Java using D
Xinok via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jun 21 08:28:57 PDT 2014
On Saturday, 21 June 2014 at 09:19:19 UTC, Joseph Rushton
Wakeling via Digitalmars-d wrote:
> I can't find the issue in bugzilla, but IIRC there was a
> problem with unstable sort where it would produce
> worst-case-scenario behaviour in the event of being given input
> that had only a few unsorted elements.
>
> I ran into it when implementing some of the algorithms in
> Dgraph: appending one new element to an array and using sort()
> would generate quadratic behaviour.
>
> That case of "mostly sorted" input seems to also be present in
> the problem described here.
That has since been fixed. I implemented heapsort as a fallback
algorithm, effectively making it an introsort.
More information about the Digitalmars-d
mailing list