https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83610

--- Comment #3 from Daniel Fruzynski <bugzi...@poradnik-webmastera.com> ---
Created attachment 42980
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42980&action=edit
Benchmark

Here is benchmark for this case. With unlikely() execution time decreases from
20.5sec to 20.3sec - about 1%. For my real app change it was a bit more than
2%.

Thanks for information about this parameter, I will give it a try. So far I
noticed that gcc uses CMOV when values are stored in registers. When they are
in memory as a class fields, it generates code with branches. I am still
playing with this code, so maybe I will need it later.

BTW, what do you thing about adding 3rd param to __builtin_expect, which will
specify probability? It may be helpful in cases like mine.

Reply via email to