From: Alan Mackenzie <acm@muc.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Eli Zaretskii <eliz@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: Excessive use of `eassert`
Date: Sun, 21 Jan 2024 10:59:45 +0000 [thread overview]
Message-ID: <Zaz5ISC-CzJO8kku@ACM> (raw)
In-Reply-To: <811d5f03-fad4-47e1-b3fd-2f45229a5ee1@cs.ucla.edu>
Hello, Paul.
On Sat, Jan 20, 2024 at 17:41:57 -0800, Paul Eggert wrote:
> On 2024-01-19 11:42, Alan Mackenzie wrote:
> > On Fri, Jan 19, 2024 at 17:02:06 +0200, Eli Zaretskii wrote:
> >> make_fixnum is a trivial bit-shuffling, whereas make_lisp_symbol is
> >> much trickier. Perhaps especially so now that we have
> >> symbols-with-positions as well as bare symbols.
> > Not really. Symbols with positions don't belong in the obarray. If they
> > somehow get there, then that's a bug to be fixed.
> The problem here isn't calling make_lisp_symbol to make symbols with
> positions. It's that Qnil expands to builtin_lisp_symbol (0) which calls
> make_lisp_symbol (&lispsym[0]) which calls XSYMBOL, and XSYMBOL is
> significantly slower now that we have symbols-with-positions, even when
> it is applied to a bare symbol - and this is particularly true with
> --enable-checking and the eassert Stefan mentioned.
> I looked into this a bit and installed the attached patches which should
> speed things slightly even with a default build. The main goal was to
> speed up debugging builds, though.
I don't think the first patch is correct. With it applied, the code
no longer signals the error of a symbol with position being processed
when symbols_with_pos_enabled is false. That's in the debug build, of
course.
The second patch seems OK.
> When I built with --enable-checking this seemed to help significantly on
> Ubuntu 23.10 x86-64 with GCC 13.2 -O2 (at least looking at the machine
> code; I didn't benchmark). This depends on compiler and platform so it'd
> be helpful if Stefan could try it out on his machine and see whether it
> helps his cases' performance.
The "significantly" here means the 0.4% speed up in the default build
that you mention in the first patch, does it?
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2024-01-21 10:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 22:35 Excessive use of `eassert` Stefan Monnier
2024-01-19 7:04 ` Eli Zaretskii
2024-01-19 13:01 ` Stefan Monnier
2024-01-19 15:02 ` Eli Zaretskii
2024-01-19 15:50 ` Stefan Monnier
2024-01-19 16:23 ` Eli Zaretskii
2024-01-19 17:44 ` Stefan Monnier
2024-01-19 19:42 ` Alan Mackenzie
2024-01-19 19:56 ` Eli Zaretskii
2024-01-21 1:41 ` Paul Eggert
2024-01-21 9:57 ` Eli Zaretskii
2024-01-21 20:35 ` Paul Eggert
2024-01-21 10:59 ` Alan Mackenzie [this message]
2024-01-22 5:19 ` Paul Eggert
2024-01-22 13:07 ` Stefan Monnier
2024-01-22 14:37 ` Alan Mackenzie
2024-01-23 7:51 ` Paul Eggert
2024-01-23 11:42 ` Alan Mackenzie
2024-01-24 1:04 ` Paul Eggert
2024-01-24 15:09 ` Alan Mackenzie
2024-01-26 8:06 ` Paul Eggert
2024-01-21 15:54 ` Stefan Monnier
2024-01-22 4:12 ` Paul Eggert
2024-01-22 13:20 ` Stefan Monnier
2024-01-23 8:15 ` Paul Eggert
2024-01-23 17:11 ` Stefan Monnier
2024-01-24 7:45 ` Paul Eggert
2024-01-23 18:16 ` Eli Zaretskii
2024-01-23 19:50 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zaz5ISC-CzJO8kku@ACM \
--to=acm@muc.de \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.