Re: Vote on data structure name Marc Nieper-Wißkirchen 13 Oct 2020 13:41 UTC

Am Di., 13. Okt. 2020 um 15:23 Uhr schrieb Adam Nelson <xxxxxx@nels.onl>:
>
> Flexvectors should share all of the random-access performance characteristics of vectors, even though this limits the ways that they can be implemented. In particular:
>
> Complexity of ref and set! should be the same (amortized) for flexvectors as for vectors.
> Memory locality guarantees should be the same as vectors.
> flexvector-copy and flexvector-copy! should have similar performance to vector-copy and vector-copy!; in particular, if they are implemented with a fast memcpy operation for vectors, flexvectors should use the same operation.

Thanks for the reply (although I would have preferred a bit more
freedom). Memory locality is probably less important than in, say C,
because in Scheme only immediate values will be directly stored in the
flexvector. It should also be remarked that a flexvector may need the
double amount of space compared to a vector when it is resizing.

> Additionally, I agree with John that flexvectors and vectors should not necessarily be disjoint, and I will include this note in the next draft.

Good.