aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2024-02-13 09:54:51 -0800
committerPaul Eggert2024-02-13 11:20:32 -0800
commit08c1863257469b4cb85e97a276ba635d44b22666 (patch)
tree0c79ad0ab4fc072791ddf039b0b467543476937e /src
parentd2a5d7534c7dcdc4432bf5456cb8a76680f7aa14 (diff)
downloademacs-08c1863257469b4cb85e97a276ba635d44b22666.tar.gz
emacs-08c1863257469b4cb85e97a276ba635d44b22666.zip
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%.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h17
1 files 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;
385#define lisp_h_CONSP(x) TAGGEDP (x, Lisp_Cons) 385#define lisp_h_CONSP(x) TAGGEDP (x, Lisp_Cons)
386#define lisp_h_BASE_EQ(x, y) (XLI (x) == XLI (y)) 386#define lisp_h_BASE_EQ(x, y) (XLI (x) == XLI (y))
387#define lisp_h_BASE2_EQ(x, y) \ 387#define lisp_h_BASE2_EQ(x, y) \
388 (symbols_with_pos_enabled \ 388 BASE_EQ ((symbols_with_pos_enabled && SYMBOL_WITH_POS_P (x) \
389 ? BASE_EQ (SYMBOL_WITH_POS_P (x) ? XSYMBOL_WITH_POS (x)->sym : (x), y) \ 389 ? XSYMBOL_WITH_POS (x)->sym : (x)), \
390 : BASE_EQ (x, y)) 390 y)
391
392/* FIXME: Do we really need to inline the whole thing?
393 * What about keeping the part after `symbols_with_pos_enabled` in
394 * a separate function? */
395#define lisp_h_EQ(x, y) \ 391#define lisp_h_EQ(x, y) \
396 (symbols_with_pos_enabled \ 392 BASE2_EQ (x, \
397 ? BASE_EQ (SYMBOL_WITH_POS_P (x) ? XSYMBOL_WITH_POS (x)->sym : (x), \ 393 (symbols_with_pos_enabled && SYMBOL_WITH_POS_P (y) \
398 SYMBOL_WITH_POS_P (y) ? XSYMBOL_WITH_POS (y)->sym : (y)) \ 394 ? XSYMBOL_WITH_POS (y)->sym : (y)))
399 : BASE_EQ (x, y))
400 395
401#define lisp_h_FIXNUMP(x) \ 396#define lisp_h_FIXNUMP(x) \
402 (! (((unsigned) (XLI (x) >> (USE_LSB_TAG ? 0 : FIXNUM_BITS)) \ 397 (! (((unsigned) (XLI (x) >> (USE_LSB_TAG ? 0 : FIXNUM_BITS)) \