[erlang-questions] Arrays and setelement

Ulf Wiger ulf@REDACTED
Fri Dec 29 09:20:18 CET 2006


Den 2006-12-29 04:18:44 skrev Joel Reymont <joelr1@REDACTED>:

>
> 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.
>
> I would like to see if I can avoid copying. The reason I'm so
> concerned with copying is that I would like my "arrays" to be updated
> within a few milliseconds if not microseconds.


Copying of small tuples is usually not a terribly big problem.
Tuples of size 100 are "medium" size. If you do very frequent
updating of them, it's going to be noticable.

The deep, dark secret practices of the HiPE team may come
in handy, provided you don't tell anyone :

http://www.erlang.org/ml-archive/erlang-questions/200604/msg00228.html

BR,
Ulf W
-- 
Ulf Wiger



More information about the erlang-questions mailing list