[erlang-questions] Deforesting tuple updates

Richard Carlsson <>
Thu Feb 22 15:40:00 CET 2007


Joel Reymont wrote:
> The reason I bring this up, btw, has to do with trading systems.  
> These traditionally use time series implemented on top of arrays. To  
> calculate a moving average of prices you would allocate an array of N  
> elements and then destructively update it.
> 
> I know that you could implement the same thing with gb_trees, ETS,  
> etc. but I don't think these are optimal solutions. I have no doubt  
> I'll prove it so in the course of AlgoKit implementation.

Start out by using this array implementation and see if that will turn
out to be sufficient. It's several times faster than dicts or trees.

     http://user.it.uu.se/~richardc/array/

     /Richard




More information about the erlang-questions mailing list