[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why vectors?

This page is part of the web mail archives of SRFI 99 from before July 7th, 2015. The new archives for SRFI 99 contain all messages, not just those from before July 7th, 2015.

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.