[Issue 15553] topN very inefficient [slower than sort, even for topN(0)] but should be O(n)
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Mon Jan 18 12:48:32 PST 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15553
Ivan Kazmenko <gassa at mail.ru> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gassa at mail.ru
--- Comment #5 from Ivan Kazmenko <gassa at mail.ru> ---
(In reply to Andrei Alexandrescu from comment #3)
> BTW uniform() isn't the problem; replacing it with r.length / 2 keeps things
> slow.
Can uniform() call be returned, then?  Otherwise, topN can now show quadratic
performance on a pre-generated input:
https://issues.dlang.org/show_bug.cgi?id=15583
--
    
    
More information about the Digitalmars-d-bugs
mailing list