From: Simon Frankau <sgf@arbitrary.name>
To: 35562@debbugs.gnu.org
Subject: bug#35562: "varset" bytecode inline path is never taken
Date: Sat, 4 May 2019 14:27:23 +0100 [thread overview]
Message-ID: <CAGQB+MKm3NLrD471ktxK-uNHfWLRk2RWq79iD3fNkJCS0SWyQQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 704 bytes --]
While reading the source, I noticed in bytecode.c that:
/* Inline the most common case. */
if (SYMBOLP (sym)
&& !EQ (val, Qunbound)
&& *!XSYMBOL (sym)->u.s.redirect*
&& !SYMBOL_TRAPPED_WRITE_P (sym))
SET_SYMBOL_VAL (XSYMBOL (sym), val);
should be:
/* Inline the most common case. */
if (SYMBOLP (sym)
&& !EQ (val, Qunbound)
&& *XSYMBOL (sym)->u.s.redirect == SYMBOL_PLAINVAL*
&& !SYMBOL_TRAPPED_WRITE_P (sym))
SET_SYMBOL_VAL (XSYMBOL (sym), val);
As it is, the inline case is never run, since "redirect" is always non-zero.
Since I'm new to emacs internals, I don't know how to benchmark to work out
if this makes a noticable performance difference. :)
Thanks,
Simon.
[-- Attachment #2: Type: text/html, Size: 2136 bytes --]
next reply other threads:[~2019-05-04 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 13:27 Simon Frankau [this message]
2019-05-04 16:10 ` bug#35562: "varset" bytecode inline path is never taken Noam Postavsky
2019-05-04 18:16 ` Paul Eggert
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=CAGQB+MKm3NLrD471ktxK-uNHfWLRk2RWq79iD3fNkJCS0SWyQQ@mail.gmail.com \
--to=sgf@arbitrary.name \
--cc=35562@debbugs.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).