[Top][All Lists]

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

Re: Weak tables harmful to GC?

From: Christopher Allan Webber
Subject: Re: Weak tables harmful to GC?
Date: Mon, 09 Oct 2017 08:10:29 -0500
User-agent: mu4e 0.9.18; emacs 25.3.1

Ludovic Courtès writes:

> I’ve come to the conclusion that the 2.2 weak-table implementation
> strategy cannot work efficiently with libgc.
> I’m also skeptical (perhaps that’s also because I’m insufficiently
> informed, tell me!) about the “open-addressed” strategy that is used.
> To me, it’s necessarily less space-efficient than a regular hash table
> with chaining since we always have at least 10% more weak entries than
> the number of actual entries in the table (and in practice it’s usually
> much more than 10% AFAICS, because of the gap between subsequent sizes.)
> All in all, given that these issues are very likely causes of the
> execution time and memory consumption issues that plague the compiler
> (where we have huge symbol and source property tables), I’m in favor of
> switching back to the 2.0 implementation of weak hash tables.  That can
> be done in an API-compatible way, I think.

If ~reverting this one thing will fix our current major problems
(especially if api compatibility can be preserved), I would say it's a
good idea for now.  Presumably including a re-iteration of the weak hash
tables that include the new work could be still done in the future once
these problems are solved?

Thanks for all your hard work on this Ludo'!

reply via email to

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