(Previous discussion continued)
Re: Why vectors? Elf 13 Aug 2008 02:24 UTC

Re: Why vectors? Elf 13 Aug 2008 02:24 UTC

On Tue, 12 Aug 2008, Per Bothner wrote:

> Elf wrote:
>> creation of a new fixed-length vector is O(1).
>
> To be nit-picky: I don't see how that is possible.
> After all, the member for the vector does at least
> have to br zeroed out.
>
> Of course the constant factor is usually very low.
>

it doesnt have to be zeroed if the gc sets everything to the undefined value
when dead.  vectors dont autoinitialise to zero, the initialise to undefined,
so its just a matter of creating a single header on top of sufficient space.

-elf