[erlang-questions] how to do faster integer operations (was:some language changes)

Paulo Sérgio Almeida psa@REDACTED
Thu Jun 7 12:44:00 CEST 2007


Paul Mineiro wrote:

> It's been a good lesson to discover that using less than the full machine
> width for integers leads to significant speed up.  Is there a FAQ for
> performance where this kind of knowledge is accumulated?

Well, in the efficiency guide in the erlang documentation, section 7.1 
(file:///usr/local/lib/erlang/doc/efficiency_guide/part_frame.html) it says:

Integer (-16#7FFFFFF < i <16#7FFFFFF)	1 word

so this is the range of integers that fit in one word. This makes sense 
for 32 bit machines. The efficiency guide should be updated to say what 
the limits for 64 bit machines are (for integers, as for other types the 
distinction is made).

Regards,
Paulo



More information about the erlang-questions mailing list