Simplify the item comparison function for PriorityQueue.