Hacker News new | ask | show | jobs
by throwaway81523 660 days ago
As mentioned, something like it already exists inside Linux. Maybe it could be pulled out and turned into an app library, if it's so much better than a heap queue. Info: https://duckduckgo.com/?q=timer+wheel+linux

I remember writing a heap queue in C++ myself because std::priority_queue had some kind of shortcoming whose specifics I don't remember. Maybe I can find that program and check what it wanted. It wasn't a performance issue, but rather, something I needed was missing from the stdlib API and I remember thinking that it was silly that they omitted it.

1 comments

What you are thinking of is probably that you can't erase elements (apart from the top element) from the priority queue.
No that wasn't it. It may have had to do with constraints on the types of values that the stdlib priority queue could hold.