From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Sat, 06 Jul 2024 16:53:52 +0300 Message-ID: <8634om4oen.fsf@gnu.org> References: <-plQctKgNkvp-LJ9ov2QAiXQKxd9V-hI0yz_opRGxQtbknubCjH4rH2-ymgbw_Qr1ZhB1rtlmiEW8XtuIVNr7nR_Yj20AH6WkH6kUGp68g0=@protonmail.com> <_mNcR6ailVKpYHLxgfo_tJlYGeR0AQIzQWluspYYp5_g5pIIKkHLNfFkklQQgOKNiVW8jn8NS3i2dJ7_B2Qyx9v-Dq3MQ9mP8HNL30UWsqY=@protonmail.com> <878qyf4sgm.fsf@gmail.com> <878qye3l81.fsf@gmail.com> <86a5iu4tiy.fsf@gnu.org> <864j924s9b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2939"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 15:54:26 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sQ5rt-0000bU-48 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 15:54:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ5rV-0001IQ-CM; Sat, 06 Jul 2024 09:54:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQ5rR-0001I8-FS for emacs-devel@gnu.org; Sat, 06 Jul 2024 09:53:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQ5rR-0006kq-6y; Sat, 06 Jul 2024 09:53:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=H88FYgzVUACMuNCFXXBo2uS1utQ1imX/J2eHqipzk1w=; b=iSXGzvclCUyGC+pkjKqo 0ApNLFr47nL4L+sJPoakct+ZJNdxs8wumEqYqCyNX6Jw/eAqcUu2fNfQ8/qzHmqaFhzTAXO7FkljE P8T9U2yt4UQXKTEwSG33kkvxYB7Z+Osr9Q8+Lan97IBnTRerq2X3pWS8KfUoqV/Se2z5z+mf87kgM LnEYIt+TO7nd3h3GmSi40o5mq9c8gwilZg42Ebt6mcHUFHdOSgy7ZaWv0UeF+uN1HhnqcjgsIN8I8 l893xNY6r3s1wlp8JmaboQ+32Lvrp8Y8nR6RP5Zu/ukHb3DXxPV4RvS4197APThAxZKg/IFwLMYIO LWp824zOPm9Ztw==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Sat, 06 Jul 2024 14:43:43 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321435 Archived-At: > From: Gerd Möllmann > Cc: eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org > Date: Sat, 06 Jul 2024 14:43:43 +0200 > > >> We allocate bignums in igc. Every N bignum allocations, take some time to > >> process messages and thus finalize them. I have no idea what a good N > >> would be thpugh. We could try with 1000 and 0.1s, maybe. > >> > >> This also assumes that only bignums are allocated frequently plus must > >> be finalized. Don't know if that's true. > > > > maybe_gc is already called from places which tend to allocate Lisp > > objects, so I'd go with that. > > Right, but I have no good idea how often to call the message handling in > this case. How often is maybe_gc called, and every how many calls would > we then process messages. maybe_gc is called from eval.c, where the Lisp evaluation happens. It is also called when we detect that we are idle (see keyboard.c). > So, I've done the other thing first. Maybe we > get away wtih that, and that code at least has an idea if handling > messages might be necessary, or more often than usual. I'm surprised that we need to invent solutions for issues that we already have figured out, instead of simply reusing the wisdom we already have.