all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Excessive use of `eassert`
@ 2024-01-18 22:35 Stefan Monnier
  2024-01-19  7:04 ` Eli Zaretskii
  0 siblings, 1 reply; 29+ messages in thread
From: Stefan Monnier @ 2024-01-18 22:35 UTC (permalink / raw)
  To: emacs-devel

Building with ENABLE_CHECKING results in an Emacs that's
substantially slower.  To some extent, this is unavoidable, but

    cd .../src
    rm process.o
    make CFLAGS="-Winline -O2 -DHAVE_CONFIG_H" process.o |&
        grep make_lisp_symbol

shows that `make_lisp_symbol` is not inlined, so NILP(x) ends up being
an actual function call to a function calling another function ....
which I think is definitely in the "excessive" camp :-)

The patch below seems to address this specific issue, tho I haven't
measured its performance impact yet.


        Stefan


diff --git a/src/lisp.h b/src/lisp.h
index 914d6dd9b07..6b47b92972a 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1176,7 +1176,7 @@ make_lisp_symbol (struct Lisp_Symbol *sym)
      cast to char * rather than to intptr_t.  */
   char *symoffset = (char *) ((char *) sym - (char *) lispsym);
   Lisp_Object a = TAG_PTR (Lisp_Symbol, symoffset);
-  eassert (XSYMBOL (a) == sym);
+  /* eassert (XSYMBOL (a) == sym); */
   return a;
 }
 




^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-01-26  8:06 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18 22:35 Excessive use of `eassert` Stefan Monnier
2024-01-19  7:04 ` Eli Zaretskii
2024-01-19 13:01   ` Stefan Monnier
2024-01-19 15:02     ` Eli Zaretskii
2024-01-19 15:50       ` Stefan Monnier
2024-01-19 16:23         ` Eli Zaretskii
2024-01-19 17:44           ` Stefan Monnier
2024-01-19 19:42       ` Alan Mackenzie
2024-01-19 19:56         ` Eli Zaretskii
2024-01-21  1:41         ` Paul Eggert
2024-01-21  9:57           ` Eli Zaretskii
2024-01-21 20:35             ` Paul Eggert
2024-01-21 10:59           ` Alan Mackenzie
2024-01-22  5:19             ` Paul Eggert
2024-01-22 13:07               ` Stefan Monnier
2024-01-22 14:37               ` Alan Mackenzie
2024-01-23  7:51                 ` Paul Eggert
2024-01-23 11:42                   ` Alan Mackenzie
2024-01-24  1:04                     ` Paul Eggert
2024-01-24 15:09                       ` Alan Mackenzie
2024-01-26  8:06                         ` Paul Eggert
2024-01-21 15:54           ` Stefan Monnier
2024-01-22  4:12             ` Paul Eggert
2024-01-22 13:20               ` Stefan Monnier
2024-01-23  8:15                 ` Paul Eggert
2024-01-23 17:11                   ` Stefan Monnier
2024-01-24  7:45                     ` Paul Eggert
2024-01-23 18:16                   ` Eli Zaretskii
2024-01-23 19:50                     ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.