[erlang-questions] Performance on FIFO

Gustav Simonsson Gustav.Simonsson.7871@REDACTED
Mon May 24 09:37:39 CEST 2010


Depends on what you think your bottleneck might be, what operations  
will be performed most often. Stdlib/queue might be a good start as  
you want a FIFO and are concerned about performance, it has O(1) for  
insertion and O(1) amortized, O(len(Q)) worst case for taking elements.

BR,
Gustav Simonsson

Quoting maruthavanan s <maruthavanan_s@REDACTED>:

>
> Hi,
>
> I need to implement a buffer that should hold a fixed length of   
> records say for e.g. 20 with {key,Value} relationship, I expect the   
> key would be integer and value to be list or binary upto
> length of 65536 so that I could transmit then in network.The older   
> records should be removed and newer ones should be appended. I might  
>  lookup for Values based on keys. I could see many module where I  
> can  implement this like queue, dict, lists, proplists.
>
> Which one is most good for my situation? But I want my system to be   
> fast performing, robust and should be able to
>
> Thanks,
> Marutha
>





More information about the erlang-questions mailing list