3 ms·
At some point pentium4 had static branch prediction hints, but they are obsolete and no longer relevant. Today __buitin_expect are mostly used to mark hot/cold
by gpderetta 7y ago
At some point pentium4 had static branch prediction hints, but they are obsolete and no longer relevant.
Today __buitin_expect are mostly used to mark hot/cold branches. The compiler will normally optimize hot code for speed and cold code for size also will attempt to put cold code in separate cachelines and even pages. And other similar code layout optimizations.