<br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>>>>>> Ethan Galstad wrote:<br><br>>>>>>>> For the event queue, I was thinking that a skip
<br>>>>>>>> list structure might be best for efficiency<br>>>>>>>> (<a href="http://en.wikipedia.org/wiki/Skip_list">http://en.wikipedia.org/wiki/Skip_list</a>).  The<br>>>>>>>> event queue is used in primarily two
<br>>>>>>>> situations:<br>>>>>>>> 1. Popping events from the head of the list to<br>>>>>>>>    be executed<br>>>>>>>> 2. Inserting events into the list (mid- or
<br>>>>>>>>    endpoint).</blockquote><div><br><br>Sorry for butting in so late in this discussion.  But have you considered a "Heap" (or a priority queue)?<br>(Or maybe I'm misunderstanding something here?)
<br><br><a href="http://en.wikipedia.org/wiki/Heap_%28data_structure%29">http://en.wikipedia.org/wiki/Heap_%28data_structure%29</a><br><a href="http://en.wikipedia.org/wiki/Priority_queue">http://en.wikipedia.org/wiki/Priority_queue
</a><br><br>This will allow you, with ease, to get the "lowest" priority.  (It is the first item on the heap).  <br>Time complexity of retrieval is of order: O(n * log(n))<br>Adding an item, with assorted priority, is also of order: O(n * log(n))
<br><br>Cheers,<br>--<br>EinarI<br><br></div></div>