Closed mchandschuh closed 3 years ago
I'm not sure if there's a way to make this faster than just calling .Clear()
. The heap relies on the array being zero-initialized - if the backing array is reused between instances without being cleared, it's possible for Contains()
to give a false-positive.
[Edit] Going to close this because of the above issue. If you disagree, please reopen.
For my use case, I'll have an unknown number of queues processing at the same time and in quick succession. It would be ideal if I could use
ArrayPool
to pool array allocations and then initializeFastPriorityQueue
using the pool sourced array.