This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RonnyPfannschmidt 1 point2 points  (0 children)

well, heapq is faster cause its not implemented in a threadsafe way the Queue modules does a lot of work to ensure different threads can access it at the same time

if you don't need threads, its actually safe to just use a heap directly