From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Merging scratch/no-purespace to remove unexec and purespace Date: Sat, 21 Dec 2024 22:19:55 +0000 Message-ID: <87seqghe73.fsf@protonmail.com> References: <87zfku6ra9.fsf@gmail.com> <87seql7a3o.fsf@gmail.com> <87o71553yf.fsf@gmail.com> Reply-To: Pip Cet 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="2876"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Stefan Kangas , emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 22 06:57:02 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 1tPExZ-0000ZI-U9 for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Dec 2024 06:57:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPEwr-0001nu-1M; Sun, 22 Dec 2024 00:56:17 -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 1tP7pO-0003CW-Ug for emacs-devel@gnu.org; Sat, 21 Dec 2024 17:20:06 -0500 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP7pM-0006cU-TF for emacs-devel@gnu.org; Sat, 21 Dec 2024 17:20:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734819602; x=1735078802; bh=tx+9c7Dw2uin+XhJc20OvQL+w8iJ3BHmij1kTG/iBpY=; 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:List-Unsubscribe:List-Unsubscribe-Post; b=ppI4XE4xYQjJAQP1s7S5dB4D7a/g4+Pod3syCJ6PcGpLP7MoeedK/PtkQQEpBOnDB UTEuAWALga3JDmUPa5/nds/46LExDjQn5JlXDz1eHEYssDOm5iAOpE60KyF0veBHaJ TMgsQHDNFHfypREOHflFbJHAyA3E8RPDl3PHpombIdT5/Fr6MOF4WEYWJFa6U5Iyx/ uWwlJwJ2Zz1RiHg3apiTlefHvnwCIUEI++7Z37GJAOG+2rm244NPIvZDT//7zUbaYw LqwEH894XCW0G0sdlYeMW6ICeb+Yd9aM3RgYzOCZVga1PL9nT2/LyDsd4/ttsRBbce NM+dBQEUUv5rA== In-Reply-To: <87o71553yf.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 6d0702d196d901743b54a0819ad179421181bf1e Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: Sun, 22 Dec 2024 00:56:15 -0500 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:326842 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. Very interesting, thank you for sharing! I tried everything I could think of to disprove your findings, but while I did find a minor optimization opportunity in the pdumper mark bits code (a missing eassume (offset >=3D 0) / eassume (word_number >=3D 0)), this affects both branches equally. I can only conclude that your observation is accurate, and we now have a number that is still close to zero, but measurable. The effect seems to be mostly constant (1-2 ms / GC cycle), but I did see some slightly larger differences when more objects were on the heap. Cache effects, probably (PURE_P doesn't have to wait for memory, pdumper_marked_p_impl does). (I did run into crashes when running emacs without --batch, but those are easily fixed and did not affect the performance measurements at all. I only mention this so that others running tests don't get their hopes (or fears) up). Pip