[erlang-questions] Deforesting tuple updates

Daniel Luna luna@REDACTED
Thu Feb 22 16:32:07 CET 2007


On Thu, 22 Feb 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.

I really shouldn't say this...

As long as the values in the array are simple terms, you can use 
hipe_bifs:bytearray/2.

You never heard this from me.

/Luna
-- 
Daniel Luna                           | Top reasons that I have a beard:
luna@REDACTED                     |  a) Laziness.
http://www.update.uu.se/~luna/        |  b) I can.
Don't look at my homepage (it stinks).|  c) I can get away with it.



More information about the erlang-questions mailing list