[erlang-questions] Arrays and setelement

Joel Reymont joelr1@REDACTED
Sun Jan 7 14:14:22 CET 2007


I have a nagging suspicion that performing the optimization for a  
"certified" integer won't slow things down much or increase code  
size. This would be a localized change that would also remove one of  
the biggest drawbacks to Erlang, in my opinion.

Can you point me to the section of the source code that takes care of  
this optimization? I would try a mod and check performance.

	Thanks, Joel

On Jan 7, 2007, at 10:37 AM, Bjorn Gustavsson wrote:

> 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.)


More information about the erlang-questions mailing list