[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why vectors?
On Tue, 12 Aug 2008, Per Bothner 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.