3 ms·
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 qu
by throwaway81523 2y 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 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.
- Ono-Sendai 2y agoWhat you are thinking of is probably that you can't erase elements (apart from the top element) from the priority queue.
- throwaway81523 2y agoNo that wasn't it. It may have had to do with constraints on the types of values that the stdlib priority queue could hold.