[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive use of `eassert`
From: |
Alan Mackenzie |
Subject: |
Re: Excessive use of `eassert` |
Date: |
Sun, 21 Jan 2024 10:59:45 +0000 |
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).
- Re: Excessive use of `eassert`, (continued)
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/19
- Re: Excessive use of `eassert`, Eli Zaretskii, 2024/01/19
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/20
- Re: Excessive use of `eassert`, Eli Zaretskii, 2024/01/21
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/21
- Re: Excessive use of `eassert`,
Alan Mackenzie <=
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/22
- Re: Excessive use of `eassert`, Stefan Monnier, 2024/01/22
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/22
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/23
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/23
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/23
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/24
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/26
- Re: Excessive use of `eassert`, Stefan Monnier, 2024/01/21
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/21