emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excessive use of `eassert`


From: Eli Zaretskii
Subject: Re: Excessive use of `eassert`
Date: Fri, 19 Jan 2024 09:04:47 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 18 Jan 2024 17:35:53 -0500
> 
> 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 :-)

I'm not sure I follow.  Can you elaborate?  Are you saying that the
assertion causes make_lisp_symbol not to be inlined?  And what
functions are called by NILP?

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

Is this specifically about NILP?  Or are there other situations where
this assertion slows us down considerably.  I wouldn't want to drop
this assertion so summarily, if possible.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]