3 ms·
Which cpu instructions guide branch prediction algorithms? Which cpus?
by harry8 7y ago
Which cpu instructions guide branch prediction algorithms? Which cpus?
- gpderetta 7y agoAt 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.