[MLton-devel] Minimizing space usage in ML (fwd)

Stephen Weeks MLton@mlton.org
Tue, 22 Oct 2002 10:30:21 -0700


> Oh well, thanks anyway for the interesting discussion. It's a real
> pity the idea doesn't seem to be practical: I had pipe-dreams of ML
> throwing away all duplicate copies as it was executing... perhaps in
> the future.

The idea that Henry mentioned:

> If MLton had something in the heap indicating immutability (which
> could, of course be generated from the stack and some code tables I
> think) then we could do the sharing hack I described that I did long
> ago for Mathematica.

is practical and eliminates all duplicates in an object or even the
entire heap by combining copying GC with hash consing.  To implement
it in MLton requires propagating a bit more information through the
backend of the compiler to the runtime about mutability of objects,
accessible via the object header, so that the runtime can know whether
objects can be shared.

It's been on our (huge :-() list of things to add for well over a
year and won't make it in without a push or help from someone.


-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel