From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Wed, 03 Jul 2024 08:30:17 +0200 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1150"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Pip Cet , 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 08:31:18 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 1sOtWQ-00009T-38 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jul 2024 08:31:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOtVb-0000Wk-D3; Wed, 03 Jul 2024 02:30:27 -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 1sOtVY-0000TO-9v for emacs-devel@gnu.org; Wed, 03 Jul 2024 02:30:24 -0400 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOtVW-0003aO-FV; Wed, 03 Jul 2024 02:30:23 -0400 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52cdfb69724so6157788e87.1; Tue, 02 Jul 2024 23:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719988219; x=1720593019; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hh3KkpNMEIr9bgJQOgqjkD6Y0M90wtsfrleK77EiOiI=; b=ZTJMoXBBx/7hCr+HDtTf8y6bvRwCXuA4rN05KmJjw/J6WHhXug02SDi2lZXUJgbVGi KEVgF2bpM+j+0I8mFCmmveIfApI/UKoQW4N+NRKzZxinHZs1tviVXQVASL6bH+Ehb+Vz r2WLwdrUNUGS5BRz+wf1XVJ8KIhc1rRnLrZrKlonU04n1Xma8f1AqVuQaLyocP0zTRHm 3S54HOV+CUTUxdOHDky/1LnMOYzrro/XBZTacZ5EX++EFK/2PmSqBznJMbw8yG+WNi8F 6ZFs3QSJc0snb/+Eh965uaoV5NISMMES4mEJYJboOY5HzgqIwGyTAU/ZfxSSe0UxXZo8 j9wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719988219; x=1720593019; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hh3KkpNMEIr9bgJQOgqjkD6Y0M90wtsfrleK77EiOiI=; b=iiz8BfXadCc+NJs/RfQNiX02nFR2lKoLkgRRVL8Qoa7uJRcIq+hZtqfPPJ2GHGOAZf /GR4h1aRro6IyLrnxhftK+7BBwKe8rzcVGoDI1/WzfFLZqnlvs5Gy9wbYFf7AXsigLd0 uv3ZookNMmaD7Fydb4NHLRGcoLMd9kqKRPwJxIH86njq4CzO0QURYfOVRwM+4awcdj00 yZl0wC3uKKF/rC+KR0A6gGOwcyP3+MpcvHdCTWZNyonhmLumwAz3jUsbrMK8zMF4SLMR FD+92MjdCnoW9P9etld+/TsqzqBWbi1uVKG771tl1WBqzysd23LobMf458jxBouWxCJ4 4y/Q== X-Forwarded-Encrypted: i=1; AJvYcCXke8skRvUoLzvTynq2M4KJDDZMT+bC/MsT3TTVDe5VDiwENtvmmWyW0NLn1pdWckD8xuY3yQW4zKWU8SdxEn5sGOez X-Gm-Message-State: AOJu0Yzj+sQJN6+eyKOlyLYzzikzrVAgQ6SyvPzQrbATKmSqWZiq02u1 /JmzeD+J4xA0eiT2K1svot1sco6WqohQyk77k7fdGSoKT1NGaAY7NmvkHQ== X-Google-Smtp-Source: AGHT+IFYC2hJWM0aVdhdgvBcEudIrtiGQeJiv6yWIdknGTIbm5fohFnU4gWV2GYsCM3hCun2gurbHw== X-Received: by 2002:a2e:8856:0:b0:2ee:7d37:498b with SMTP id 38308e7fff4ca-2ee7d374b90mr7751741fa.14.1719988218926; Tue, 02 Jul 2024 23:30:18 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e362dd.dip0.t-ipconnect.de. [217.227.98.221]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58cb2b83380sm530687a12.74.2024.07.02.23.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 23:30:18 -0700 (PDT) In-Reply-To: <86msmzbqqg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 02 Jul 2024 21:20:23 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:321229 Archived-At: Eli Zaretskii writes: >> Date: Tue, 02 Jul 2024 16:34:40 +0000 >> From: Pip Cet >> Cc: gerd.moellmann@gmail.com, eller.helmut@gmail.com, emacs-devel@gnu.org >> >> > > 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 unaligned, except for symbols which aren't pointers in the >> first place. In essence, MPS was focusing on the wrong language (for >> us). > > The pointers we hide in Lisp objects are already aligned. Why cannot > we use them directly? Please read https://memory-pool-system.readthedocs.io/en/latest/pool/awl.html# Chapter 7.3 Software emulation, and 7.4 Cautions.