Optimized lists

Bjorn Gustavsson bjorn@REDACTED
Mon Mar 14 08:45:44 CET 2005


"Richard A. O'Keefe" <ok@REDACTED> writes:
[...]
> 
> (2) Making a cons cell would no longer be a simple matter of bumping a
>     register (the required check for overflow can be amortised over
>     several allocations; I don't know whether it is or not) and filling
>     in a couple of words.  The length field has to be computed and stored
>     as well.  So the time to make *every* list goes up by 33% as well,
>     maybe more.

The overflow test IS amortised over several allocations in Beam.

And as Richard C already noted in another mail, cons cell take up two words,
so the extra cost would be 50%.

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



More information about the erlang-questions mailing list