[erlang-questions] Arrays and setelement

Bjorn Gustavsson <>
Sun Jan 7 11:37:02 CET 2007

Joel Reymont <> writes:

> Bjorn,
> What is the reason behind the literal index restriction?

Speed. Allowing a variable for Index would have made the instruction
slower and/or increased the code size. (And increased code size for the
Beam interpreter could mean less speed as well, because of worse cache
hit rat.)


Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list