This enables efficient implementations of priority queues, and will also be used in LibCompress for efficient huffman tree generation.