[MUD-Dev] [TECH] Event Queues in MUDs

Jon Lambert tychomud at ix.netcom.com
Thu Dec 20 01:38:38 CET 2001


Daniel.Harman at barclayscapital.com wrote:
 
> Still progressing slowly with my game, and started work on
> implementing an event queue/scheduler class. Does anyone have any
> particularly good priority queue algorithms for this type of
> thing?  

Well from Sedgewicks 'Algorithms in C' pg. 367 I find the following
table which may be useful...

  ---------cut------------
  Worst case costs of priority queue implementations

                            delete             find      change 
                   insert   maximum   delete   maximum   priority   join
  ordered array      N        1         N        1          N         N   
  ordered list       N        1         1        1          N         N
  unordered array    1        N         1        N          1         N 
  unordered list     1        N         1        N          1         1 
  heap              lg N     lg N      lg N      1         lg N       N
  binomial queue    lg N     lg N      lg N     lg N       lg N      lg N 
  best in theory     1       lg N      lg N      1          1         1
  -------endcut----------

--
--* Jon A. Lambert - TychoMUD        Email:jlsysinc at ix.netcom.com *--
--* Mud Server Developer's Page <http://tychomud.home.netcom.com> *--
--* If I had known it was harmless, I would have killed it myself.*--
  

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list