From cf26f573162130fed73c6e5603cb58e158903add Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 20 Jan 2024 16:52:31 -0800 Subject: [PATCH 1/2] Simplify and tune XSYMBOL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/lisp.h (XSYMBOL): Simplify and tune. There is no need to examine symbols_with_pos_enabled here, since the arg must be a symbol so if it's not a bare symbol then it must be a symbol_with_pos; and checking whether a symbol is bare is cheap. With Ubuntu 23.10 on a Xeon W-1350, this shrank Emacs’s executable text size by 0.1% and sped up a default build of all *.elc files by 0.4%. Remove unnecessary eassert, since XBARE_SYMBOL and XSYMBOL_WITH_POS have easserts that suffice. --- src/lisp.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index 20b28e93c8d..c3309c81a16 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1156,10 +1156,7 @@ XBARE_SYMBOL (Lisp_Object a) INLINE struct Lisp_Symbol * ATTRIBUTE_NO_SANITIZE_UNDEFINED XSYMBOL (Lisp_Object a) { - eassert (SYMBOLP (a)); - if (!symbols_with_pos_enabled || BARE_SYMBOL_P (a)) - return XBARE_SYMBOL (a); - return XBARE_SYMBOL (XSYMBOL_WITH_POS (a)->sym); + return XBARE_SYMBOL (BARE_SYMBOL_P (a) ? a : XSYMBOL_WITH_POS (a)->sym); } INLINE Lisp_Object -- 2.40.1