3 ms·
Yes, if you're keeping pointers. The thing is, the gain is completely wiped out by maintaining the heap invariant which has to copy the whole thing instead of w
by AstralStorm 8y ago
Yes, if you're keeping pointers. The thing is, the gain is completely wiped out by maintaining the heap invariant which has to copy the whole thing instead of walking a single branch. The same memory bandwidth issue plagues B trees.
This shows up with big trees. For small, again, you're better off with a list.
Van Emde Boas trees are better but yet more complex still. (And colored pointer variant is not available for them)
The tradeoff is speed of write vs read in case of heaps. They have pretty bad write performance.