From: Chet Murthy <murthy@pauillac.inria.fr>
To: John Harrison <John.Harrison@cl.cam.ac.uk>
Cc: caml-list@pauillac.inria.fr
Subject: Re: Structure sharing
Date: Thu, 17 Mar 1994 10:21:51 +0100 [thread overview]
Message-ID: <17303.763896111@pauillac.inria.fr> (raw)
In-Reply-To: Your message of Wed, 16 Mar 1994 17:01:12 +0000. <"swan.cl.cam.:120340:940316170214"@cl.cam.ac.uk>
Hi, John,
I also did some work recently with structure-sharing in Coq.
Specifically, I wrote a caml-light generic hash-conser which walks the
in-memory representation in an unsafe manner, "re-sharing" a
datastructure. Since I don't have type information, I can't detect
the fact that something's mutable, so this only works for purely
applicative data.
Whatever. Anyway, I had an application where I wanted to read
something in off of disk, and then "un-share" it completely - walk it
completely, so I could hash the leaves of the datastructure into a
symbol table. But then, well, the datastructure is unshared - I ought
to re-share it, no? Well, hash-consing was a modest loss on a
reasonable-sized benchmark.
That is, for Constructions at least, the datastructures are simple
enough, and small enough, that hash-consing costs more than it is
worth when it is done "globally"
On the other hand, when I did it on the output of the type-checker,
and the term which I fed as input (coupled, so that the type-checker's
output will be hash-consed "onto" the term being type-checked), I got
a slight speedup.
All this to say that it probably isn't a big win either way, in
caml-light, for Coq.
--chet--
prev parent reply other threads:[~1994-03-17 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-16 17:01 John Harrison
1994-03-16 20:26 ` Xavier Leroy
1994-03-17 9:21 ` Chet Murthy [this message]
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=17303.763896111@pauillac.inria.fr \
--to=murthy@pauillac.inria.fr \
--cc=John.Harrison@cl.cam.ac.uk \
--cc=caml-list@pauillac.inria.fr \
/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