unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: emacs-devel@gnu.org
Subject: Removing pure space
Date: Thu, 4 Mar 2021 13:19:58 +0000	[thread overview]
Message-ID: <CAOqdjBcWAFfu39dDUA2LTSg7xJ9_8qGShGDRC+NTyz1wVBc1uQ@mail.gmail.com> (raw)

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



             reply	other threads:[~2021-03-04 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 13:19 Pip Cet [this message]
2021-03-04 14:49 ` Removing pure space Stefan Monnier
2021-03-04 14:55   ` Pip Cet
2021-03-04 15:51     ` Pip Cet
2021-03-04 15:53     ` Stefan Monnier
2021-03-05 20:28 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOqdjBcWAFfu39dDUA2LTSg7xJ9_8qGShGDRC+NTyz1wVBc1uQ@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).