#if defined(__GNUC__) && !defined(LUA_NOBUILTIN)
#define luai_likely(x) (__builtin_expect(((x) != 0), 1))
#define luai_unlikely(x) (__builtin_expect(((x) != 0), 0))
#else
#define luai_likely(x) (x)
#define luai_unlikely(x) (x)
#endif
#define LIKELY(x) __builtin_expect(!!(x),1)
#define UNLIKELY(x) __builtin_expect(!!(x),0)
https://blog.csdn.net/GrubLinux/article/details/37543489
相关文章
- 01-06内核中的 likely() 与 unlikely()
- 01-06unlikely
- 01-06springboot警告以及问题解决:** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
- 01-06Linux likely unlikely
- 01-06likely() and unlikely()
- 01-06gcc/linux内核中likely、unlikely和__attribute__(section(""))属性
- 01-06ikely()与unlikely() 都等同于if, 此处只是做编译优化
- 01-06springboot报错;Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package
- 01-06linux likely和unlikely