[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Significant Garbage Collection Improvement For Emacs" - sweep_conse
From: |
Po Lu |
Subject: |
Re: "Significant Garbage Collection Improvement For Emacs" - sweep_conses performance improved by 50%? |
Date: |
Sat, 29 Oct 2022 13:41:40 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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.