partition function into cold and hot function by using __builtin_expect

陈云星 chen.yunxing@me.com
Thu May 6 16:12:04 GMT 2021


In my test : https://godbolt.org/z/87dWMejPP <https://godbolt.org/z/87dWMejPP>

It seems [[likely]] and [[unlikely]] just have same effective like __builtin_expect;

Will not split function into cold function and hot function ( which __attribute__((cold)) on callee function can do so).

> 2021年5月6日 下午7:27,Jonathan Wakely <jwakely.gcc@gmail.com> 写道:
> 
> [[likely]]



More information about the Gcc-help mailing list