topN using a heap

Jon Degenhardt via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 23 13:45:27 PDT 2016


On Friday, 23 September 2016 at 16:09:18 UTC, Andrei Alexandrescu 
wrote:
>
> BTW, as I commented in 
> https://issues.dlang.org/show_bug.cgi?id=16517, using the new 
> topN implementation instead of sort to compute the median over 
> google's 1-grams is over 11x faster using dmd.
>
That's a very nice result. Both the absolute numbers and that all 
three sets achieve similar performance, as they different 
distribution characteristics.

--Jon


More information about the Digitalmars-d mailing list