From: Po Lu <luangruo@yahoo.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>, tyler@tdodge.consulting
Subject: Re: "Significant Garbage Collection Improvement For Emacs" - sweep_conses performance improved by 50%?
Date: Sat, 29 Oct 2022 13:41:40 +0800 [thread overview]
Message-ID: <871qqr425n.fsf@yahoo.com> (raw)
In-Reply-To: <CADwFkmnT04otjCHxSi1dZHDr4yApA8h-_MbEH6nT7uy64vpcxQ@mail.gmail.com> (Stefan Kangas's message of "Sat, 29 Oct 2022 07:07:25 +0200")
Stefan Kangas <stefankangas@gmail.com> writes:
> In this blog post
>
> https://tdodge.consulting/blog/living-the-emacs-garbage-collection-dream
>
> the author asserts that a one-line patch "reduces the total wall clock
> duration for sweep conses execution by approximately 50%", at least in
> one benchmark. There are some caveats; read the blog post for the
> full story.
My guess is that the blog post overestimates the performance cost of
branch predictor misses, and underestimates the real effect of the
change, which is making sweep_conses walk an array more and a linked
list less. Which is also more cache friendly, but sweeping any kind of
array is intrinsically faster than doing the same to a linked list for
any number of other reasons.
I don't know what the memory consumption impact of such a change would
be since I haven't tried it myself.
next prev parent reply other threads:[~2022-10-29 5:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-29 5:07 "Significant Garbage Collection Improvement For Emacs" - sweep_conses performance improved by 50%? Stefan Kangas
2022-10-29 5:19 ` Christopher Dimech
2022-10-29 5:41 ` Po Lu [this message]
2022-10-29 6:07 ` Tyler Dodge
2022-10-29 14:32 ` Stefan Monnier
2022-10-30 0:53 ` Po Lu
2023-02-11 20:10 ` Ihor Radchenko
2023-02-12 21:58 ` Konstantin Kharlamov
2023-02-13 20:07 ` Konstantin Kharlamov
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=871qqr425n.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=emacs-devel@gnu.org \
--cc=stefankangas@gmail.com \
--cc=tyler@tdodge.consulting \
/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).