You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm really appreciating the DoublePriorityQueue: it lets me easily remove entries from one end to avoid overfilling a constant size, kind of like a work-queue LRU cache.
Since the heap is internally just a heap of element indices, I've been pondering having a priority queue with two (or more) unrelated priority measures, stored in two different index heaps. That would add a constant factor to the O(log n) guarantees (based on arbitrary remove), but it'd unlock the ability for me to have two different strategies for the threads selecting work items from the queue. In particular, I'm performing a graph search where every work item has a few variables that I combine unscientifically into a "score", and rather than perfect an equation, I'd like to just use one variable independently as its own measure in one thread (without doing a linear map().min() over the whole heap).
The text was updated successfully, but these errors were encountered:
Hey, I'm really appreciating the DoublePriorityQueue: it lets me easily remove entries from one end to avoid overfilling a constant size, kind of like a work-queue LRU cache.
Since the heap is internally just a heap of element indices, I've been pondering having a priority queue with two (or more) unrelated priority measures, stored in two different index heaps. That would add a constant factor to the
O(log n)
guarantees (based on arbitrary remove), but it'd unlock the ability for me to have two different strategies for the threads selecting work items from the queue. In particular, I'm performing a graph search where every work item has a few variables that I combine unscientifically into a "score", and rather than perfect an equation, I'd like to just use one variable independently as its own measure in one thread (without doing a linearmap().min()
over the whole heap).The text was updated successfully, but these errors were encountered: