topN using a heap
Jon Degenhardt via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 21 10:37:22 PDT 2016
On Wednesday, 21 September 2016 at 14:58:27 UTC, Andrei
Alexandrescu wrote:
> 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
Very good, thanks. It'll be interesting to see how this algorithm
does on this data set.
--Jon
More information about the Digitalmars-d
mailing list