emacs-devel
[Top][All Lists]
Advanced

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

Re: Improving EQ


From: Pip Cet
Subject: Re: Improving EQ
Date: Fri, 13 Dec 2024 12:24:37 +0000

Óscar Fuentes <ofv@wanadoo.es> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>>> But reading your message makes me wonder if EQ and some other "simple"
>>> fundamental functions are not lowered by nativecomp? If not, maybe
>>> that's a significant opportunity for improvement.
>>
>> Nativecomp only compiles eq for Lisp code, the one discussed here is the
>> eq used in C (and bytecode).

Does nativecomp actually call emit_EQ for anything but lowering ELC jump
tables into a sequence of conditional branches?  I don't see any code to
do so, and Emacs builds fine without emit_EQ if
byte-compile-cond-use-jump-table is disabled.

> Of course this change also affects Emacs running with nativecomp, as
> many calls to EQ are made by C functions not lowered by nativecomp.

My impression is that nativecomp usually ends up calling Feq for
eq-based conditions.

My point is that emit_EQ is used very rarely, when emitting a switch
statement (and switch statements should usually use
maybe_remove_pos_from_symbol + BASE_EQ rather than EQ).

So I won't bother doing anything with emit_EQ.

Pip




reply via email to

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