[erlang-questions] Arrays and setelement

Bjorn Gustavsson bjorn@REDACTED
Sun Jan 7 11:37:02 CET 2007


Joel Reymont <joelr1@REDACTED> 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.)

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB




More information about the erlang-questions mailing list