emacs-devel
[Top][All Lists]
Advanced

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

Re: master b467bb5 4/4: Minimize ‘equal’ calls in (delete x vector)


From: Paul Eggert
Subject: Re: master b467bb5 4/4: Minimize ‘equal’ calls in (delete x vector)
Date: Sat, 15 Aug 2020 17:49:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 8/15/20 1:21 PM, Pip Cet wrote:

Looks correct, but establishes a rather questionable precedent of
putting Lisp_Objects in SAFE_ALLOCA'd space. That's okay in this
specific case, for a number of reasons, but it's bound to be copied by
someone in circumstances where it's not :-)

It's not unprecedented, as there's one other instance of this, in font_sort_entities. Admittedly it's unusual; feel free to add a comment.
It does bug me a bit that GCC generates bad code for 'NILP (Fequal (...))' here.
I've been meaning to add a bool function equal (...) that would simplify the C
source a bit and presumably let GCC do better, but that can wait.

What's GCC doing, for you?

It's doing some weird thing involving cmp + adc. On second thought it's probably fine, as it is branch-free. Still, I always get confused when I write "!NILP (Fequal (a, b)' and too often I get it wrong. I'd rather write 'equal (a, b)'.



reply via email to

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