白衣蓝剑冰魄

关注

likely应用

白衣蓝剑冰魄

关注

阅读 74

2022-12-01


#include <stdlib.h>
#include <iostream>
using namespace std;
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)

int main() {
int x;
cin >> x;
if (unlikely(x) >= 100000) {
cout << x << " is too big." << endl;
}

return 0;
}

 objdump -S Test

相关推荐

sunflower821

most likely due to a circular import

sunflower821 70 0 0

知年_7740

This is very likely to create a memory leak

知年_7740 75 0 0

日月同辉9908

linux宏定义likely和unlikely解析

日月同辉9908 47 0 0

老榆

Which of the following quantities is likely to show more temporal autocorrelation

老榆 176 0 0

Raow1

Capturing 'self' strongly in this block is likely to lead to a retain cycle

Raow1 65 0 0

先峰老师

Linux内核中的宏定义likely()与unlikely()

先峰老师 212 0 0

分湖芝蘭

flume报错:Sinks are likely not keeping up with sources, or the buffer size is too tight

分湖芝蘭 39 0 0

小安子啊

C语言技巧:有if时使用likely和unlikely让代码运行更快

小安子啊 92 0 0

Brose

完美解决AttributeError:partially initialized module ‘‘has no attribute‘‘(most likely dueto a circula

Brose 43 0 0

Mezereon

AttributeError: partially initialized module ‘jieba‘ has no attribute ‘cut‘ (most likely due to a ci

Mezereon 50 0 0

精彩评论(0)

0 0 举报