`priq` fast priority queue that accepts partially ordered items as score arguments.

54 points Hellr0x

I was working on A* Search algorithm implementation and discovered that you can't use elements that implement the PartialOrd trait with BinaryHeap from std to build a priority queue. This means you can't use it with float numbers.

So, I implemented a version of the priority queue that asks for only the PartialOrd trait for sorting and performs faster than BinaryHeap for element insertion and for popping (2x faster for queues with < 1000 items).

Github

Documentation

If you want a priority queue with float values, or any custom type that only has PartialOrd give priq::PriorityQueue.

feedback, criticism, is appreciated!