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: Removing pure space Date: Thu, 4 Mar 2021 13:19:58 +0000 Message-ID: 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="23462"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 04 14:21:51 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 1lHnvK-0005yy-UR for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 14:21:50 +0100 Original-Received: from localhost ([::1]:34606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHnvJ-0001co-Vg for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 08:21:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHnu9-0000he-JE for emacs-devel@gnu.org; Thu, 04 Mar 2021 08:20:37 -0500 Original-Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]:35172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHnu7-0001DP-No for emacs-devel@gnu.org; Thu, 04 Mar 2021 08:20:37 -0500 Original-Received: by mail-oi1-x236.google.com with SMTP id i21so27773663oii.2 for ; Thu, 04 Mar 2021 05:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7/C9UJCABH5GaJyWILctbkEMOgoiQr+EGzrAphsY4gA=; b=ZLRHKaK/+PUTIgo08BoYEwg3NjzQsVprMykg3QFIGWSbV3rpZTsRuwm7v9BXppXovk XYaO1nyD7pqMLcH7DOLTrmu0iLTHBinv4NN2s3egZTLiOUiQPuDdAsXi48fLaHT1aWdh +H2tpcGopBdcxeZqHzrEhFCeBeyI3tD7PKqvFTF67wuL/m2lcigQH3roiEd20ILVBfm7 K96tv/kALMktsAi4EG/jE3FX1y6g74Z5OjSRT7jrOvMFgTYGLk+2/EsdLg4ps9SlCvXG T27Otn9R28W16hmcHLRjhmp/2P/s7HG7FQV6o74SKUH5HCJehLwZr3oicmFa/jtNsR4e Y70Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7/C9UJCABH5GaJyWILctbkEMOgoiQr+EGzrAphsY4gA=; b=gDPYQcG4CD0n45Dc0GP0Lj3+jOY72JopypMwonJ4jLBMM1FEx2BTfJHgFiTVjxDYZl 80Kx9B+zsRBJ2Je2UwnqgJ0szNQDcii5QmuIcOjF/ypuNab+CyN6499C/8SJOv4Dj/pV BdSXzdRm9e1RLJ84RsqRh8AxQHFGiyfrcdLRQmhVnF4MaGBu/7b/hcdWpXtYyl2p3KO7 YJESTd6Q8TkF1mPpTorvEqf1xf28hBrdQOUIDlwKyWEzfkDUhhQ8QWWqlW+G0ntng9/r lv3trj/ifuOYZS0RcWb+fzcuDB/CUahZBGzTO58DlwnzCABRlhGYmgLxkM4MmMcOlbaC cpeQ== X-Gm-Message-State: AOAM5300iTEkxmQ0OcwO+UGhRNwtlN4buJDTpKlEijniXMrNqa3/63Mg d3Obly11+aJxz6y46Jsqp0OqqM1n3rvIHhdi0811almP3wdobA== X-Google-Smtp-Source: ABdhPJx4Q3SRyQSKLnG5EEVZId1ZcOatmOdmpqm+kRsbggPG/pphiSk8iNHlRWRxkK3h8WV+sp/roOxqbozhjFLimTg= X-Received: by 2002:aca:af0e:: with SMTP id y14mr3001527oie.44.1614864034435; Thu, 04 Mar 2021 05:20:34 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=pipcet@gmail.com; helo=mail-oi1-x236.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:265949 Archived-At: I believe it is time to remove pure space from Emacs 28. It's a needless complication which no longer provides clear gains. On the other hand, it has clear disadvantages now that pdumper has become the standard dumper: we end up putting about 3 megabytes of zero bytes into each Emacs executable on GNU/Linux systems, for example. Furthermore, the pure space code, even though it has been with us so long, still has issues: see bug#46916 for one. Most importantly, though, pure space requires a lot of complicated code in places that are very hairy and difficult to modify; for example, any change to the garbage collector has to be careful to handle this special case correctly and (to the extent that this is even possible) efficiently. I am linking to a rebased patch which removes pure space from Emacs 28. It does not remove purecopy, it just modifies that function to perform hash consing of values without purifying them: https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-03/msg00335.html Further steps would be to redefine purecopy to be a no-op, remove calls to it from existing code, and finally to remove it entirely. Those steps are not urgent, though. Please note that this is almost entirely independent of any plans or discussions to remove unexec support or require pdumper. When I last looked into this issue, the Emacs 28 tree would not build with unexec support, but, once modified to do so, it built just fine with the pure space removal patch applied. 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. So, is anyone going to speak up to defend pure space? Once that is settled, we can look at the actual patch and see whether I made any mistakes in removing pure space. Pip