emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: noverlay branch


From: Stefan Monnier
Subject: Re: noverlay branch
Date: Fri, 07 Oct 2022 10:56:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> I think in the context of this overlay work the performance difference
>>> is not very significant, since the code is doing a lot of other stuff
>>> while traversing the tree.
>> I agree.  I think NULL could be better in multi-threaded cases, as
>> Stefan alluded to.
>
> The current code should be multi-thread safe (except for the global
> iterator, of course), despite its use of a global sentinel node: there's
> no need to synchronize anything when reading a read-only field or when
> writing a write-only field.

But indeed, while it might be safe, its performance in a multi-threaded
situation (with multiple cores) might be affected, because of the
cache-line granularity and because the CPUs can't know that those writes
can be reordered (or even thrown away) since they will never be matched
by a corresponding read.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]