[erlang-questions] Priority queues and Erlang

Ola Andersson A ola.a.andersson@REDACTED
Mon Jun 15 15:28:28 CEST 2009


I'm a bit amused that I accidentally sparked such a heated debate with a
humble remark about priority queues.
Lots of references to interesting papers here and there so it was
worthwhile reading through it.

Anyway, agreeing with Richard statement below, I would be more than
happy with any priority queue.
Preferably, but not neccessarily, more efficient than gb_trees. 
I'm lazy so I don't want to dig through the old code archive to find an
implementation each time I need one.
I just want a ready-to-use module in OTP similar to queue. 
Something like prio_queue:new()/in(Item,Prio,Q),out(Q) would do just
fine.
As long as it is reasonably efficient I don't care exactly how it's
implemented, event if it's interesting 
from a theoretical perspective.
/OLA.

> -----Original Message-----
> From: erlang-questions@REDACTED 
> [mailto:erlang-questions@REDACTED] On Behalf Of Richard O'Keefe
> Sent: den 15 juni 2009 04:48
> To: John Haugeland
> Cc: Erlang Users' List
> Subject: Re: [erlang-questions] Priority queues and Erlang
> 

> 
> To be useful in Erlang, a priority queue implementation does 
> not have to be as fast as one in C.  It just has to beat the 
> alternatives (like gb_trees) currently available in Erlang.
> 
> 


More information about the erlang-questions mailing list