26 Nov
2013
26 Nov
'13
3 p.m.
AMDG On 11/25/2013 11:14 PM, tim wrote:
yes, the handling of the stability count is a bit fragile, though 64bit integers are probably enough to prevent overflows in most applications. a simple way to prevent the overflow could also be to simply subtract the minimum value of all stability counts, which could be done in O(n) by traversing the heap twice.
That's unreliable, because there's no guarantee that any particular counter is ever removed. It's quite possible still to have 0 in the queue when you reach 2^64. In Christ, Steven Watanabe