[MLton] an analysis to flatten refs into tuples

Matthew Fluet fluet@cs.cornell.edu
Mon, 17 May 2004 09:31:32 -0400 (EDT)

> The savings is obvious, I hope.  We avoid an extra heap-allocated
> object for the ref, which in the above case saves two words.  We also
> save the time and code for the extra indirection at each get and set.
> There are lots of useful data structures (singly-linked and
> doubly-linked lists, union-find, fibonacci heaps, ...) that I believe
> we are paying through the nose right now because of the absence of ref
> flattening.

Looking at the diagnostics of the beginnings of the refFlatten pass, it
looks like there will be a big win in the IO data-structures as well.  I
see a lot of position and closed refs that look like they will be