[webkit-dev] Time to remove LIKELY and UNLIKELY macros?
abarth at webkit.org
Mon Oct 1 23:19:55 PDT 2012
Apparently, we set COMPILER(GCC) on clang, so we are at least feeding
this information to the clang compiler. COMPILER(GCC) is a confusing
name for a macro that also include clang. :(
On Mon, Oct 1, 2012 at 11:11 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> I don't think so. I wrote a code that can be 10% slower without UNLIKELY
> several weeks ago:
> On Mon, Oct 1, 2012 at 10:55 PM, Adam Barth <abarth at webkit.org> wrote:
>> According to
>> __builtin_expect (what our LIKELY and UNLIKELY macros expand to )
>> doesn't do anything on modern CPUs. Apparently, these used to be
>> important for PowerPC, but I don't think many folks use WebKit on
>> PowerPC anymore.
>> Should we remove these macros? I wasted some time today experimenting
>> with them without realizing that they compile to no-ops in clang.
>>  http://trac.webkit.org/browser/trunk/Source/WTF/wtf/Compiler.h#L188
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
More information about the webkit-dev