[erlang-questions] Arrays and setelement
Fri Dec 29 04:11:19 CET 2006
On Dec 29, 2006, at 2:57 AM, Mikael Pettersson wrote:
> setelement works by copying, except when the BEAM compiler
> can prove that intermediate copies are redundant, in which
> cases it simple performs assignments.
Assignment is what I'm after. How can I help the BEAM compiler prove
that intermediate copies are redundant?
I will be assigning _and_ reading very often. The "arrays" would be
implementing "depth of market", i.e. each element of the "array"
would correspond to a price and hold a bid or ask quantity. Bid/ask
quantities can change every few milliseconds in a fast market.
Yes, I'm fine with tuples instead of arrays if I can avoid copying.
Binaries, as suggested by Julian would be fine too, if, again,
copying can be avoided.
More information about the erlang-questions