topN using a heap

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 21 07:58:27 PDT 2016


On 9/21/16 4:16 AM, Jon Degenhardt wrote:
> Timing comparison of sort and topN, times in milliseconds:
>
>           sort      topN
> Field 2:   289      1756
> Field 3:   285    148793
> Field 4:   273    668906
>
> The above times are for LDC 1.1.0-beta2 (DMD 2.071.1). Similar behavior
> is seen for DMD 2.071.2. This makes topN pretty much unusable.

I have it on my list to move https://arxiv.org/abs/1606.00484 into 
Phobos. Thanks for the data! -- Andrei



More information about the Digitalmars-d mailing list