4 ms·
You can hint the compiler: https://en.cppreference.com/w/cpp/language/attributes/likely https://en.cppreference.com/w/cpp/language/attributes/likely Or you can
by knorker 6y ago
You can hint the compiler: https://en.cppreference.com/w/cpp/language/attributes/likely https://en.cppreference.com/w/cpp/language/attributes/likely
Or you can use profile directed optimization, as others mentioned.
In my test recently it reduced branches as a whole by 30%, according to perf stat ./a.out