SSA IL

Matthew Fluet fluet@CS.Cornell.EDU
Tue, 9 Oct 2001 19:30:45 -0400 (EDT)


> 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.

But, the point is that the vector isn't just copied.  If I map any
non-trivial transformation over the set of elements, then nothing get's
shared.  Meanwhile, the processed elements are still live because the
source vector is live.

E.g.  A 100 vector (v) of int arrays, each with 100 elements.  If I do
Vector.map(v, fn a => Array.rev a)
then, for a brief amount of time, I have 2 * 100 * 100 words live, when,
really, I only every have 100 * 100 words live.