From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Tue, 02 Jul 2024 20:16:10 +0000 Message-ID: References: <86ed8cc4un.fsf@gnu.org> <86zfqzc3ky.fsf@gnu.org> <86plrvbydg.fsf@gnu.org> <_ThR9pdYMaIpZASWVEUqh-TuMSUydDM4v4g6QeKGUJE3ilY4tfRXHPiXAGG4RupeAl8BIJ8FFr2BUiWT9xUvB8W4uuEXypIz6GrGXYLPG88=@protonmail.com> <86msmzbqqg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31584"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 03 04:23:19 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 1sOpeR-00080v-4F for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jul 2024 04:23:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOpdq-0002ec-D5; Tue, 02 Jul 2024 22:22:42 -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 1sOjvR-0006lO-Ok for emacs-devel@gnu.org; Tue, 02 Jul 2024 16:16:31 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOjvG-0008DS-Fk for emacs-devel@gnu.org; Tue, 02 Jul 2024 16:16:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719951374; x=1720210574; bh=PTEwMZJD7mDRNXuU4oYEuGHXyrLuyjDyVDAd6Q00coA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=WQFCO5I7ZEr2nBSWG5EuTUA5SIue6yoxUfXMczvPijYSvXheWSo6cUUWwC4NVG5se FpPTGVwaDCsgxOVkdVyyCcRcqxUploQNlJuEth1kdzuIb4JIIkTSmrgeoBrKlONTND pGpYKQZ/vZL8QO9rOtmhCOVopVWEeLTFoRdZg4LuraM2TjvHq7tQTGTGJacV1yQyln x26885/CaMvrqJAxy74TBBJD+VP9OgZ6WeHkwvS0vs2z01XRydvHzSfxomf3VjEU9m xih2cD7VfTWjySPeUxDpSrpGYFiox0NE2ePc/XEn4qaPP2H1Eggb0U9FCm/L5V3CYm xJCdfp4YM6jhg== In-Reply-To: <86msmzbqqg.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: e6ae4e60df785f64c0b3c768b73222c1a83ad0bc Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 02 Jul 2024 22:22:28 -0400 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:321221 Archived-At: On Tuesday, July 2nd, 2024 at 18:20, Eli Zaretskii wrote: > > Date: Tue, 02 Jul 2024 16:34:40 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: gerd.moellmann@gmail.com, eller.helmut@gmail.com, emacs-devel@gnu.o= rg > >=20 > > > > 1. mangle all Lisp_Objects to pointers or fixnums when storing them= in a weak hash table, and unmangle them upon retrieval > > > > 2. not use 32-bit x86 machines > > > > 3. modify MPS > > > > 4. throw caution to the wind and just hope it works > > > > I don't understand why (1) is needed. Lisp objects are already > > > > pointers in disguise, so what exactly is the problem here? > >=20 > > They need to be aligned for MPS to understand they're pointers; they're= unaligned, except for symbols which aren't pointers in the first place. In= essence, MPS was focusing on the wrong language (for us). >=20 > The pointers we hide in Lisp objects are already aligned. Why cannot > we use them directly? We need to store the tag somewhere, and I'm not entirely sure it's okay for= the pointer to be anything but an MPS base pointer, which is a struct igc_= header *, not, say, a struct Lisp_Cons *. I'll go check the docs again. Pip