Made BinaryHeap faster.