new Cps optimization -- flattening arrays

Henry Cejtin henry@clairv.com
Tue, 21 Dec 1999 15:01:23 -0600


For this transformation to be fast, it is clearly essential that cps sub does
NOT do the bounds check, otherwise you would do the check twice.

Are you convinced that the transformation is  always  a  win.   Note,  it  is
essentially  flattening  out something, and that can cost you.  As a concrete
example: if I subscript into an (int * int) array,  and  the  result  has  to
actually  be  a  tuple, then the old code will not have to allocate the tuple
(because it can share with the array element) while the new code will.

All of this really kind  of  shows  that  the  flattening  problem  is  still
unresolved.