6 ms·
The problem is that currently asynchronous libraries often use binary heap as a representation of internal priority queue. This is a grossly ignorant statement
by huhtenberg 18y ago
The problem is that currently asynchronous libraries often use binary heap as a representation of internal priority queue.
This is a grossly ignorant statement. I have written my share of event loops (including epoll and IOCP based) and choosing heap for timer management is an obviously dumb thing to do if you care about the performance. Also removing objects from the event loop before delivering a callback is even more dumb for exact reasons he listed in the post. Essentially what he's bitching about is a lame-ass un-optimized implementation of an event engine.
Also, interestingly enough he actually reinvented a simplified form of Linux timer management code - http://lwn.net/Articles/156329 http://lwn.net/Articles/156329.