mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] ephemerons


From: Taylor R Campbell
Subject: [MIT-Scheme-devel] ephemerons
Date: Tue, 10 Aug 2010 20:38:53 +0000
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/9.0.1

I've just committed an implementation of ephemerons to the Git
repository, including documentation; see the reference manual for a
description of the semantics, and see runtime/test-ephemeron.scm in
the tests directory for some examples of their behaviour.

Eventually I'd like to introduce `key-ephemeral' hash tables, which
are like key-weak hash tables but use ephemerons rather than weak
pairs for entries, and then replace most uses of key-weak hash tables
by key-ephemeral hash tables, because key-ephemeral hash tables are
more often what one really wants than key-weak hash-tables are.  (In
some systems, such as CLISP and SBCL, what are called `key-weak hash
tables' behave as though their entries were ephemerons rather than
weak pairs.)  I haven't done this yet because

(1) I want to make sure ephemerons are stable first -- there's a
    minimal test suite, but I haven't used ephemerons extensively yet;
    and

(2) I'd like to reduce the amount of time the garbage collector spends
    on ephemerons: although it is linear in the number of ephemerons,
    and costs practically nothing when there are no ephemerons to
    trace, I have empirically found it to be slower than I like.

I don't presently intend to change the semantics of key-weak hash
tables, and in any case they are lighter-weight than key-ephemeral
hash tables, so they may still be useful.

So please try out ephemerons and subject them to all sorts of stress
and torture, and if you have any ideas for improving the performance
of ephemeron garbage collection, which I haven't tuned very much, let
me know.  Also let me know if you have any questions or comments or
flames or other feedback on the concept or implementation.  (I didn't
come up with the term `ephemeron', though, so you can't rightly credit
or blame me for that.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]