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: Removing pure space Date: Thu, 4 Mar 2021 15:51:30 +0000 Message-ID: References: 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="6338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 04 16:53:03 2021 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 1lHqHf-0001Xa-CF for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 16:53:03 +0100 Original-Received: from localhost ([::1]:45674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHqHe-0007yw-D0 for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 10:53:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHqGs-0007X9-4X for emacs-devel@gnu.org; Thu, 04 Mar 2021 10:52:14 -0500 Original-Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:46799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHqGo-0003Fg-18 for emacs-devel@gnu.org; Thu, 04 Mar 2021 10:52:13 -0500 Original-Received: by mail-ot1-x32f.google.com with SMTP id 97so752319otf.13 for ; Thu, 04 Mar 2021 07:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+CB1iNKdbhnqzPhuf/t696eMDL1EeEsCJZ7knw8OnoI=; b=kvPJeHNSU7aGka67aAXUr1P0m4+l7O+g36LgydCSwTGaWFAy/F0+Qde5AuRwy0zBQX nTbija9oe7E4gdedrRI+ltUjSibxIedKIB/4mgRRABt9A3FN3AH9uBTYHPxzOXkRgfTf hqvkxxy/1k5zpZnMgVF7zwNaK5s9rEe1UwZIzoDRhXz+0hFyc6G2F4jjpYfbNlXohKuX RDOxUkRb3kZq8YaIj5IML9TuubqqJGk0ZgRquyRW0UZawAT+t9M8puDVkyFXMus+gfqu cdD4VbIFI0t/S89PsW0aAEjXQZzgXAjgeM0c7R96Acfu0+oVDsqXTiNYBn1Zvfb/W0O/ 7PQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+CB1iNKdbhnqzPhuf/t696eMDL1EeEsCJZ7knw8OnoI=; b=DwBuTXZydKPTLzc5tCL2kHqSXPdGcqTA/xYqg2i2ASyxLRUNwsmwPBS/KgVRjdvFxO sHKZeN0fjXsD/3kG8qBn4OzxE5AjbWHVgVjxBr/ruTAKhjyk10c9udN2Z+tmimxmDSpT e2NTgcSwnOwQ3mht7ack5PY1WJdOjMV/4Zn/V8H+IgcEWsFhdjdjtnxl86wsiwL1tkfm BFeOnh3XqHckdaTUcFVsNDQxdO9xaUqYtyAvFNU4siyuIwUCPYl6P7Pyf8UqY+em7438 0Q7FI71z22AHGJLW51e25+SN3NGmHha6hPWqt3hSJCsohbrd21lh3idVKsGwY0MuVfsh Xh/w== X-Gm-Message-State: AOAM532PqB06D9BKFDZlg79R6ThWHHJpVn/qJOgv3+XbUjmPbAdnZQmz 7aKggTZugITOKyB5/w4hIk4N2a1/szz04vlpL2Y= X-Google-Smtp-Source: ABdhPJx9UNDTpMaXFwFZPRpcT1hWAwjs8fK8ByCobLSWeta4k6965zRSzhz5MkWSUtfjcijzqFFBd+ISIR8owzoZfXs= X-Received: by 2002:a05:6830:1011:: with SMTP id a17mr1675970otp.154.1614873126401; Thu, 04 Mar 2021 07:52:06 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=pipcet@gmail.com; helo=mail-ot1-x32f.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.23 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" Xref: news.gmane.io gmane.emacs.devel:265969 Archived-At: On Thu, Mar 4, 2021 at 2:55 PM Pip Cet wrote: > On Thu, Mar 4, 2021 at 2:49 PM Stefan Monnier wrote: > > > I have not been able to measure any performance changes with this > > > patch applied, but unfortunately I'm currently on a system unsuitable > > > for running reliable benchmarks. If this is a concern, any help > > > measuring the performance impact more accurately would be appreciated. > > > > The main expected benefit from the purespace is that the GC doesn't need > > to look at it, so the GC should be faster because it looks at a smaller > > part of the heap. > > With pdumper, I don't think that's true anymore. There are three Lisp > objects for which PURE_P returns true: the empty vector, unibyte > string, and multibyte string. > > In fact, if anything, it'll be slower because of the extra overhead of > the PURE_P checks... > > > So I think a good micro-benchmark which should expose the worst-case > > impact of removing the purespace would be to compare the time taken to > > perform GC (I think the effect should be most visible right at startup > > since the more packages and stuff you have loaded, the smaller the > > proportion of the heap kept in purespace). > > So you're saying I should build with unexec, then run something like: > > "time ./emacs --batch --eval '(dotimes (i 10000) (garbage-collect))' > > ? Because I don't really think that benchmark makes sense with pdumper... 2590983 pure bytes used Okay. I've just sacrificed several small animals (one of them kept screaming DO NOT EDIT! GENERATED AUTOMATICALLY!) in order to build emacs with unexec one final time. Two final times, in fact, with and without my patch. And here I was going to gloat about how there's no measurable difference, but there is. It's faster by about a millisecond per (garbage-collect) call, or about 30% of the time that loop takes. Again, though, that's only compared to unexec, which hasn't built since Paul merged my eager hash table rehashing patch quite some time ago, and isn't trivial to build even with that fixed. Pip