Description[POSSIBLE PERFORMANCE IMPACT] Use __builtin_expect on Clang as well (for UNLIKELY and LIKELY)
OOPS:
Nop, since COMPILER(CLANG) => COMPILER(GCC)
Fixed gratuitous test in:
Remove redundant test: COMPILER(GCC) || COMPILER(CLANG) => COMPILER(GCC)
https://codereview.chromium.org/105673006/
====================================================
Original description
Performance impact:
Likely has minor positive effect on Mac (uses Clang).
UNLIKELY and LIKELY use __builtin_expect, which provides some performance
benefit (not a lot, but every bit helps).
This compiler directive is supported on Clang, not only GCC,
so this turns it on in Clang.
(This is the only use of __builtin_expect in Blink.)
(Suggested by Kouhei.)
Docs:
http://llvm.org/docs/BranchWeightMetadata.html#builtin-expect
http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
Patch Set 1 #
Messages
Total messages: 11 (0 generated)
|