caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Gregory Morrisett" <jgm@cs.cornell.edu>
To: "Markus Mottl" <markus@mail4.ai.univie.ac.at>,
	"John R Harrison" <johnh@ichips.intel.com>
Cc: <caml-list@inria.fr>
Subject: RE: [Caml-list] "super-compaction" of values
Date: Thu, 2 Aug 2001 09:28:04 -0400	[thread overview]
Message-ID: <24C06C2959910949931A2337CB264DCB052044@opus.cs.cornell.edu> (raw)

> > I ended up writing a naive implementation, without making stuff
> > garbage-collectible, but only using it for structures I knew were
> > persistent. To my chagrin, it turned out that Malcolm was absolutely
> > right. Space usage actually went *up*, presumably because 
> the hashing
> > datastructures were large enough to overwhelm the small amount of
> > sharing.

For the TAL type-checker, we used hash-consing to represent type terms
(which are quite big for TAL) and this had a significantly good impact
on performance.  See:

Dan Grossman and Greg Morrisett.  Scalable Certification for Typed
Assembly Language.  In the 2000 ACM SIGPLAN Workshop on Types in
Compilation, Montreal, Canada, September 2000.
www.cs.cornell.edu/talc/papers/tal_scale.ps

Similarly, Zhong Shao's Flint IL uses hash-consing for type terms
quite effectively.  I can dig up the reference if you like.  In
these two settings, one has to worry about the exponential blow
up you can get by turning a DAG into a tree.  In addition, the
hash-consing made structural equality tests quite cheap (O(1))
which is important for type checking or proof verification.  For
TAL, GC was not an issue, though we thought it might be.  For Flint,
if memory serves, they periodically flushed the table or used
some finalization/weak-pointer tricks.  

And long ago, I remember that Eric Cooper hacked the SML/NJ collector
to do hash-consing on major collections for immutable objects so as
to generically compress the heap.  If memory serves, he got fantastic
reductions in overall space (at the expense of much slower collections.)
Those were the days when SML/NJ did a lot of paging on a standard
workstation...

Another interesting data point is that Scott Nettles and his group
at Penn did some work compressing heap images and found that they
compress remarkably well, which suggests that we waste a lot of space.

-Greg
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


         reply	other threads:[~2001-08-02 13:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02 13:46 Dave Berry
2001-08-02 13:28 ` Gregory Morrisett [this message]
2001-08-02 15:56   ` Markus Mottl
     [not found] <200108011606.JAA29019@dhpc0010.pdx.intel.com>
2001-08-02  9:42 ` Markus Mottl
  -- strict thread matches above, loose matches on Subject: below --
2001-08-01 13:12 Damien Doligez
2001-08-01 10:20 Markus Mottl
2001-08-01 13:41 ` Thorsten Ohl
2001-08-01 14:09   ` Markus Mottl
2001-08-01 14:29     ` Thorsten Ohl
2001-08-01 15:25       ` Markus Mottl
2001-08-02  1:48 ` Alexander V. Voinov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24C06C2959910949931A2337CB264DCB052044@opus.cs.cornell.edu \
    --to=jgm@cs.cornell.edu \
    --cc=caml-list@inria.fr \
    --cc=johnh@ichips.intel.com \
    --cc=markus@mail4.ai.univie.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).