From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: pipcet@protonmail.com, acorallo@gnu.org, emacs-devel@gnu.org,
stefankangas@gmail.com
Subject: Re: master 8c81818673a 6/7: Tune volatile in read_char
Date: Mon, 19 Aug 2024 22:27:21 +0300 [thread overview]
Message-ID: <86ttfgwbxi.fsf@gnu.org> (raw)
In-Reply-To: <71607435-31fd-4a6c-8392-ad5725c8f3b3@cs.ucla.edu> (message from Paul Eggert on Mon, 19 Aug 2024 11:59:28 -0700)
> Date: Mon, 19 Aug 2024 11:59:28 -0700
> Cc: acorallo@gnu.org, emacs-devel@gnu.org, stefankangas@gmail.com
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> On 2024-08-19 09:15, Eli Zaretskii wrote:
> > Why not simply undo that single patch, and be done?
>
> Let's not. The issue has long been present and is not limited to
> read_char; see, for example, the variable "this_op" in exec_byte_code,
> which is merely a volatile copy of "op". The method Emacs uses to
> address this issue works and there's no reason to use a different method
> in read_char than everywhere else.
I'm talking only about that particular change, whose motivation is
described as "Optimize access to a local volatile." If this is just
an optimization, and its effect on performance is as you describe it,
but it has a downside of making the code harder to read and maintain,
why not pay that small penalty in performance?
> A better way to deal with 'volatile' is to not use it, the way Stefan
> did in 2013; see commit adf2aa61404305e58e71cde0193bb650aff2c4b3.
I have nothing against 'volatile' in general. Once again, this is
only about the "optimization" part of your changes.
next prev parent reply other threads:[~2024-08-19 19:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <172386820621.30556.15409337288904485218@vcs2.savannah.gnu.org>
[not found] ` <20240817041648.A6687C2BC66@vcs2.savannah.gnu.org>
2024-08-17 15:04 ` master 8c81818673a 6/7: Tune volatile in read_char Andrea Corallo
2024-08-17 17:03 ` Pip Cet
2024-08-17 18:16 ` Paul Eggert
2024-08-17 18:17 ` Paul Eggert
2024-08-18 7:39 ` Andrea Corallo
2024-08-18 21:39 ` Paul Eggert
2024-08-18 21:57 ` Sam James
2024-08-18 22:03 ` Paul Eggert
2024-08-19 14:43 ` Andrea Corallo
2024-08-19 15:01 ` Eli Zaretskii
2024-08-19 15:32 ` Pip Cet
2024-08-19 15:44 ` Eli Zaretskii
2024-08-19 16:01 ` Pip Cet
2024-08-19 16:15 ` Eli Zaretskii
2024-08-19 18:59 ` Paul Eggert
2024-08-19 19:27 ` Eli Zaretskii [this message]
2024-08-19 19:05 ` Pip Cet
2024-08-19 19:29 ` Eli Zaretskii
2024-08-19 19:43 ` Paul Eggert
2024-08-19 20:08 ` Pip Cet
2024-08-19 22:20 ` Paul Eggert
2024-08-19 23:40 ` Pip Cet
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=86ttfgwbxi.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acorallo@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=pipcet@protonmail.com \
--cc=stefankangas@gmail.com \
/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).