From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Merging scratch/no-purespace to remove unexec and purespace Date: Sun, 22 Dec 2024 01:28:11 +0000 Message-ID: References: <87zfku6ra9.fsf@gmail.com> <87seql7a3o.fsf@gmail.com> <87o71553yf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29748"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Pip Cet To: Helmut Eller , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 22 02:29:07 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 1tPAmI-0007cz-Bm for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Dec 2024 02:29:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPAlZ-0002OV-Jg; Sat, 21 Dec 2024 20:28:21 -0500 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 1tPAlV-0002OB-0g for emacs-devel@gnu.org; Sat, 21 Dec 2024 20:28:17 -0500 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPAlT-0002gD-M3 for emacs-devel@gnu.org; Sat, 21 Dec 2024 20:28:16 -0500 Original-Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-aa6b4cc7270so462486266b.0 for ; Sat, 21 Dec 2024 17:28:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734830892; x=1735435692; darn=gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=LnQApScUjAYOrMLBEExoUfVR2VsL4AYMgqh4MYAuk+Y=; b=Qq5XLRKpn/0LtNkGwG/Isq0UiOuti7nn7S33zYI2g+POiRrxFbwa8sQ+zoya2S/agZ zsVwAIQq7J5I6/0KXLsN1ns6V2wbGADtRyq3M8V1y+M4cG6yZUIL7RHK5YCSHP/4X4Sa uDztUFCPBgoM6QpncEi8inuVI/HyphTRCXY92T7VJ0SX3HGV0cAEIuEC38yKjMtTLCmi qidcaXXft9Mj+NpPtT2ecnlgRUcNqB47YvnCroXlvVaNnZdJXt0NooyYEwTUKMkc62ED 7AXY77+jeRFaoBKJrCk9p/Uyod0XA71I4zf1xv5a6/K5s5r8NQZnFqyXJnNJHAfPti0R 0U8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734830892; x=1735435692; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LnQApScUjAYOrMLBEExoUfVR2VsL4AYMgqh4MYAuk+Y=; b=XC2HvO6fWtKdx2F05Zkiu6mNuodont5gVuAga3R1854yXu7//JgYNewN4JY2QY5//P KeLp+WYdyjzn0BacJTV8/hxTsBrNL6ZQmo9CVu34JAYeAG3nqzmVumIO4pWqhffiTbk5 gGrP/+MtxCGskTYzMbSUN1qqKpSKtZiVIOT+yza+strOi7O+A4FvuJCvEWQT1VXaDxkn X8VggQAmViBdX44ktpu2u8MJ6hjV/p+exYsUzLEYo6Ci13B4/14GZK0UVOcUbKerVjlL DfZ0Yu+D0Lxqlz137BtqEN96C2TLRqhbKCfTC0z4yerGjqTkWsYpCDtQKNg12Qbowy07 UrUQ== X-Gm-Message-State: AOJu0Ywz8drQ1H4snWNgPylUQWPyITw7SqXxcqvsCBOgaN/7WZTtE5dH 4431UlhuU3bY/M+afBIBnmfY8Ojtr/4wDvfIbX/Lgw+6TE9M/G2bY7mLQzUzcyLRfPK/+9UqHp9 o7+wANOToFfFGZVCcGf0GwPQKwLq4rmVs X-Gm-Gg: ASbGnctrAfIAIEPPLCXpPKplHiv5Y9gj7ymLsOXvI2tkUrjfdrIW8vF0Xly/C8CBEEb Fq1VOAJO7nE7yWyRADWSdfqJe/WLNicW+jJJ+EvI= X-Google-Smtp-Source: AGHT+IGIL+d31mSFNHKYz1z+W4RGqiq3ANdOG0rvMX6GfstE71NwHsMp1tMSK4yJOjLamxJxABzklf16/zQKvxbI2w8= X-Received: by 2002:a05:6402:540b:b0:5d6:48ef:c19f with SMTP id 4fb4d7f45d1cf-5d81de1c28fmr19238937a12.29.1734830891687; Sat, 21 Dec 2024 17:28:11 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 22 Dec 2024 01:28:11 +0000 In-Reply-To: <87o71553yf.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=stefankangas@gmail.com; helo=mail-ej1-x62b.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:326836 Archived-At: Helmut Eller writes: > On Wed, Dec 18 2024, Helmut Eller wrote: > > [...] >> So the pdumper copies objects from purespace to the dump like normal >> objects; when loading the dump, purespace stays empty. >> >> I had (wrongly) assumed that the pdumper creates a separate section for >> pure objects. Creating such a section sounds easy enough (hmm, maybe >> not so easy because of hashtables). Still not sure if it would be worth >> the effort. > > Out of curiosity, I implemented such a section with the attached patch. > It seems that it would save ~2ms per collection cycle. > > To measure this, I compared the output of > > ./src/emacs -Q --batch --eval \ > '(let* ((stats (benchmark-run 1000 (garbage-collect)))) > (message "%s" (/ (elt stats 2) (elt stats 1))))' > > between the versions with and without the patch. The results was: > > without-pure-section: 0.006251480181 > with-pure-section: 0.003986384857 This is interesting, thanks. Would this experiment easily transfer to and be relevant to the MPS branch?