From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.devel Subject: Re: Weak tables harmful to GC? Date: Mon, 09 Oct 2017 08:10:29 -0500 Message-ID: <87fuaspiuy.fsf@dustycloud.org> References: <87wp9gwz8m.fsf@gnu.org> <87fug4o8z2.fsf@pobox.com> <87wp54z3p5.fsf@gnu.org> <87zi9th1i6.fsf_-_@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507554654 26748 195.159.176.226 (9 Oct 2017 13:10:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2017 13:10:54 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.3.1 Cc: Andy Wingo , Mark H Weaver , guile-devel To: Ludovic =?utf-8?Q?Court=C3=A8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Oct 09 15:10:48 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1XpQ-0005WL-Ko for guile-devel@m.gmane.org; Mon, 09 Oct 2017 15:10:40 +0200 Original-Received: from localhost ([::1]:57848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1XpY-0000AU-1o for guile-devel@m.gmane.org; Mon, 09 Oct 2017 09:10:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1XpN-0000AA-Tv for guile-devel@gnu.org; Mon, 09 Oct 2017 09:10:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1XpI-0003Xq-CT for guile-devel@gnu.org; Mon, 09 Oct 2017 09:10:37 -0400 Original-Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:55930) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e1XpI-0003XG-7q; Mon, 09 Oct 2017 09:10:32 -0400 Original-Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 069EA2671F; Mon, 9 Oct 2017 09:10:29 -0400 (EDT) In-reply-to: <87zi9th1i6.fsf_-_@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c02::f03c:91ff:feae:cb51 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19319 Archived-At: Ludovic Court=C3=A8s writes: > I=E2=80=99ve come to the conclusion that the 2.2 weak-table implementat= ion > strategy cannot work efficiently with libgc. > > I=E2=80=99m also skeptical (perhaps that=E2=80=99s also because I=E2=80= =99m insufficiently > informed, tell me!) about the =E2=80=9Copen-addressed=E2=80=9D strategy= that is used. > To me, it=E2=80=99s necessarily less space-efficient than a regular has= h 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=E2=80=99s= 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=E2=80=99m 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'!