Lib: Faster priority queue implementation