[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive use of `eassert`
|
From: |
Paul Eggert |
|
Subject: |
Re: Excessive use of `eassert` |
|
Date: |
Sat, 20 Jan 2024 17:41:57 -0800 |
|
User-agent: |
Mozilla Thunderbird |
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.
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.
0001-Simplify-and-tune-XSYMBOL.patch
Description: Text Data
0002-Speed-up-make_lisp_symbol-when-debugging.patch
Description: Text Data
- Excessive use of `eassert`, Stefan Monnier, 2024/01/18
- Re: Excessive use of `eassert`, Eli Zaretskii, 2024/01/19
- 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 <=
- 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, 2024/01/21
- 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