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 16:34:40 +0000 Message-ID: <_ThR9pdYMaIpZASWVEUqh-TuMSUydDM4v4g6QeKGUJE3ilY4tfRXHPiXAGG4RupeAl8BIJ8FFr2BUiWT9xUvB8W4uuEXypIz6GrGXYLPG88=@protonmail.com> References: <86ed8cc4un.fsf@gnu.org> <86zfqzc3ky.fsf@gnu.org> <86plrvbydg.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="26283"; 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 Tue Jul 02 20:21:27 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 1sOi86-0006eJ-Sg for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jul 2024 20:21:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOi7Q-0002dM-Bd; Tue, 02 Jul 2024 14:20:44 -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 1sOgSu-0002Jw-Ts for emacs-devel@gnu.org; Tue, 02 Jul 2024 12:34:48 -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 1sOgSt-0000uf-1K; Tue, 02 Jul 2024 12:34:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719938083; x=1720197283; bh=duTAiKFKixJRa28FTEraKCX2ciCJBoY13WXcpXFVn1k=; 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=w2leuJbPUZ14Dgu2W817Lp0VWCx9tVEoKnMyDymE04GnGU42hMAEmmXZCBrjJGfI9 +4uKMcmHE4Gd7tZLp2gSe54BcDTNKwomfGdNMvL4PbDrmuAkn++6rsWB7RrDJKNq7S 6XOsH2/lskjWv2G+osFXh9s7+mliALvTatD+e1gAknIXlfPBAappHfchvjgGx/9OOE mcpHE4SMMUWh9ppCz6NP2sMe14Li0Q8nfESNCe/7PdADV7QG+sg75oJ1HtKP1H4ohY vAovS7H42ExePzfi+ZEHhBqbCfZlWCd88D1ZXlBb5yfWF3rooh3/ukvlqDM01p+VcB 2JNL2+SkYhm5g== In-Reply-To: <86plrvbydg.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: a96b4e091527251632b4fffe91ee8537ce3f3c33 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 14:20:42 -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:321193 Archived-At: On Tuesday, July 2nd, 2024 at 15:35, Eli Zaretskii wrote: > > Date: Tue, 02 Jul 2024 15:03:44 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: Gerd M=C3=B6llmann gerd.moellmann@gmail.com, eller.helmut@gmail.com= , emacs-devel@gnu.org > >=20 > > That means we must do one of the following: > >=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? They need to be aligned for MPS to understand they're pointers; they're una= ligned, except for symbols which aren't pointers in the first place. In es= sence, MPS was focusing on the wrong language (for us). > I also don't understand how come an optimization turned out to do us > some harm. Isn't that quite common, really? That said, I really like Helmut's idea, though I'm trying to simplify it fu= rther to dumb it down to my level. Is it okay if I install the changes for Ihor's bugs first, then fix IA32? I= still need to do some work to make sure they build without any unnecessary= overhead in the !HAVE_MPS case. Pip