[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using __builtin_expect (likely/unlikely macros)
From: |
Alex Gramiak |
Subject: |
Re: Using __builtin_expect (likely/unlikely macros) |
Date: |
Mon, 15 Apr 2019 23:33:51 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> I'm not sure whether you put LIKELY and UNLIKELY somewhat randomly,
> just for testing, or did you really think each place is
> likely/unlikely as in the change, but at least some places in xdisp.c
> are wrong: they use LIKELY where UNLIKELY is more appropriate, abd
> vice versa.
Out of curiosity, which places would that be? I only put UNLIKELY calls
around the checks for emacs_abort (which I presume to be unlikely), and
the LIKELY calls are of the form:
else if (LIKELY (<cond>))
{
...
}
else
emacs_abort ();
So if already at the "else if" clause, it's likely that the condition is
true, otherwise an abort would take place.
- Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/14
- Re: Using __builtin_expect (likely/unlikely macros), Paul Eggert, 2019/04/14
- Re: Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/14
- Re: Using __builtin_expect (likely/unlikely macros), Paul Eggert, 2019/04/15
- Re: Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/15
- Re: Using __builtin_expect (likely/unlikely macros), Eli Zaretskii, 2019/04/15
- Re: Using __builtin_expect (likely/unlikely macros),
Alex Gramiak <=
- Re: Using __builtin_expect (likely/unlikely macros), Eli Zaretskii, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Paul Eggert, 2019/04/15
- Re: Using __builtin_expect (likely/unlikely macros), Stefan Monnier, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Paul Eggert, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Paul Eggert, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Alex Gramiak, 2019/04/16
- Re: Using __builtin_expect (likely/unlikely macros), Stefan Monnier, 2019/04/16