[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 08c18632574 2/8: Simplify and speed up EQ again
From: |
Paul Eggert |
Subject: |
master 08c18632574 2/8: Simplify and speed up EQ again |
Date: |
Tue, 13 Feb 2024 14:20:42 -0500 (EST) |
branch: master
commit 08c1863257469b4cb85e97a276ba635d44b22666
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Simplify and speed up EQ again
* src/lisp.h (lisp_h_BASE2_EQ, lisp_h_EQ): Simplify and refactor.
On x86-64 with GCC 3.2 this shrinks temacs text by 0.055% and
after removing all *.elc files speeds up 'make' by 1.0%.
---
src/lisp.h | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/lisp.h b/src/lisp.h
index f6133669ac1..b609bef990c 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -385,18 +385,13 @@ typedef EMACS_INT Lisp_Word;
#define lisp_h_CONSP(x) TAGGEDP (x, Lisp_Cons)
#define lisp_h_BASE_EQ(x, y) (XLI (x) == XLI (y))
#define lisp_h_BASE2_EQ(x, y) \
- (symbols_with_pos_enabled \
- ? BASE_EQ (SYMBOL_WITH_POS_P (x) ? XSYMBOL_WITH_POS (x)->sym : (x), y) \
- : BASE_EQ (x, y))
-
-/* FIXME: Do we really need to inline the whole thing?
- * What about keeping the part after `symbols_with_pos_enabled` in
- * a separate function? */
+ BASE_EQ ((symbols_with_pos_enabled && SYMBOL_WITH_POS_P (x) \
+ ? XSYMBOL_WITH_POS (x)->sym : (x)), \
+ y)
#define lisp_h_EQ(x, y) \
- (symbols_with_pos_enabled \
- ? BASE_EQ (SYMBOL_WITH_POS_P (x) ? XSYMBOL_WITH_POS (x)->sym : (x), \
- SYMBOL_WITH_POS_P (y) ? XSYMBOL_WITH_POS (y)->sym : (y)) \
- : BASE_EQ (x, y))
+ BASE2_EQ (x, \
+ (symbols_with_pos_enabled && SYMBOL_WITH_POS_P (y) \
+ ? XSYMBOL_WITH_POS (y)->sym : (y)))
#define lisp_h_FIXNUMP(x) \
(! (((unsigned) (XLI (x) >> (USE_LSB_TAG ? 0 : FIXNUM_BITS)) \
- master updated (d61145cc8cf -> a4a99405d00), Paul Eggert, 2024/02/13
- master 08c18632574 2/8: Simplify and speed up EQ again,
Paul Eggert <=
- master d202f1b9e74 7/8: XSYMBOL eassume speedups, Paul Eggert, 2024/02/13
- master efdcd7b8f78 3/8: Remove BASE2_EQ, Paul Eggert, 2024/02/13
- master a4a99405d00 8/8: Simplify position-symbol, Paul Eggert, 2024/02/13
- master 231af322b07 4/8: Remove lisp_h_PSEUDOVECTORP etc, Paul Eggert, 2024/02/13
- master 473dac88010 5/8: Remove lisp_h_XCONS etc, Paul Eggert, 2024/02/13
- master d2a5d7534c7 1/8: Simplify and speed up EQ, Paul Eggert, 2024/02/13
- master 10c6aea4434 6/8: Remove SYMBOL_WITH_POS_{POS,SYM}, Paul Eggert, 2024/02/13