-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be nice to be able to clear an IntervalHeap for re-use, to reduce array allocs and to avoid GC.
Currently ( if I understood correctly ) it can be only cleared with running either while (!iHeap.IsEmpty) iHeap.DeleteMin(); or while (!iHeap.IsEmpty) iHeap.DeleteMax();, which seems less than optimal performance wise.
A iHeap.Clear() method could Array.Clear(heap, 0, size); and then set size = 0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request