https://github.com/SienaCSISParallelProcessing/mpiclosestpairs/blob/0f1d90e6c87be2690e16bf9510a4379e8eb03d4e/mpiclosest.c#L162C28-L162C48
Since the rank 0 process spends most of the later phase waiting for a message, we could move the search for the next highest priority item to that phase.