The heap.Fix function first calls down and then calls up. If we moved the element down, we don't actually need to call up, saving a comparison (call to Less) in that case. We can do this by having down return whether the element moved and Fix can then do
if !down(h, i, j.Len()) {
up(h, i)
}
This one comparison won't matter in most cases, but if we have only a couple of elements, Less is expensive, and we repeatedly call Fix on the root, it can be significant.
Let me know 1) if it's ok to make this change, and 2) if someone who already has an environment for contributing set up wants to make it (otherwise I will do it).