lists,vectors,arrays in SML/NJ and MLton

Stephen Weeks MLton@sourcelight.com
Tue, 8 Aug 2000 13:19:40 -0700 (PDT)


> Another suprise
> was that a record of record of option refs (i.e., give each part a slot)
> was pretty bad, although not as bad as array of array. 

My bet is that this is NJ specific.

> I suspect part of
> this might be tradeoffs between places where I really want to update a
> single element quickly and other places where I want to filter or map over
> the whole structure.  Creating a list out of the individual pieces is
> more costly than simply returning the list that's right there.

The right thing to expose may be a fold procedure.  Then you never cons up the
initial list when you filter or map.