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
{{ message }}
This repository was archived by the owner on Aug 19, 2021. It is now read-only.
The queue data-structure has been molded into a 2d double linked-list
with slots for each set of events that expire at a given time. Other
than having little downsides, the biggest benifit is a constant-time
enqueueing of events with no delay while still maintaining ordering.
To reduce the memory overhead for each event, the queue is not
doubly-linked in both directions. Instead, noting that no more
than 1 reference is needed for each event, the queue is stored as
a 2d single linked-list with generalized pointers to whatever
references events.
To maintain constant-enqueueing without a tail pointer for each slot,
events are inserted as a stack and reversed on dequeueing. This does
not impact amortized complexity as each event already has to be marked
dirty.
Notable performance impact (make prof):
equeue_post_many_prof: 202 cycles (+98%)
equeue_post_future_many_prof: 207 cycles (+98%)
equeue_alloc_size_prof: 56 bytes (-16%)
equeue_alloc_many_size_prof: 64000 bytes (-14%)
equeue_alloc_fragmented_size_prof: 64000 bytes (-14%)
0 commit comments