[erlang-questions] How would you do it?

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Jul 3 10:28:49 CEST 2012


On 7/2/12 11:52 PM, Erik Søe Sørensen wrote:
>
> I think I'd do this...:
> 0) Not include the profile info if the score messages unless it really 
> does change that often.
> 1) Keep two ets tables: one with player-id as key and current score as 
> a column (and possibly other columns, for profile info etc., but for 
> this I'd only fetch the s...
>
This is my solution as well. The PSQueue data structure can be quite 
heavy in memory operations, so while it has nice properties on paper, it 
does have some hefty constant factors. I used a PSQueue in 
Combinatorrent, but eTorrent uses the above solution for its piece 
histogram.


-- 
Jesper Louis Andersen
   Erlang Solutions Ltd., Copenhagen, DK




More information about the erlang-questions mailing list