SSA IL

Henry Cejtin henry@sourcelight.com
Tue, 9 Oct 2001 18:25:04 -0500


I'm still confused.  Suppose I was using an implementation where everything
bigger than 4 bytes was done via an indirection.  In this case either the
elements are smaller than 4 bytes, in which case the 2 copies of the vector
are going to use 8 bytes per slot or they are bigger and then the elements
will be shared.  Thus using vectors isn't going to ever use more space.
I agree that with MLton, if the elements are big and NOT indirect, then the
extra space can be more for vectors, but that is what I would call backbone
space (and with flat representations, the backbone is bigger).
Is this really what is going on?  Given that I think list elements have
at least 2 words of header and one word of pointer-to-next, while vectors
have 0 per-element overhead (in the big-vector limit), I'm surprised that
this would ever cause a problem.
It does point out that you would have to know about flattening being a
possibility before you could deduce that lists might be better.