[Issue 12245] New: BinaryHeap exhibits quadratic performance in debug mode

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 25 00:26:29 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12245

           Summary: BinaryHeap exhibits quadratic performance in debug
                    mode
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: sludwig at outerproduct.org


--- Comment #0 from Sönke Ludwig <sludwig at outerproduct.org> 2014-02-25 00:26:27 PST ---
BinaryHeap.insert, conditionalInsert and replaceFront all call assertValid, 
which goes through the complete heap to check for correct structure. This 
results in unusable performance in debug mode due to the quadratic run time. 
Arguably, such costly algorithm validation should be left for a unit test 
instead.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list