Re:Intel's Redwood Cove: Baby Steps Are Still Steps
by menaerus on Monday September 23, 2024 @07:52AM
(#41625085)
In practice this doesn't result with a special-kinded instruction to hint the CPU branch-predictor but only affects the compiler to generate a codegen that is optimized for better CPU instruction-cache utilization. E.g. it will try to move the less likely code out from the hot code path and as such the likely code is going to be more dense and co-located next to each other.
[ Parent
| on HN ]
Re:Intel's Redwood Cove: Baby Steps Are Still Steps
by vlovich123 on Monday September 23, 2024 @11:59AM
(#41627489)
It can also change the instruction selection. For example, __builtin_unpredictable which is a close cousin of expect will indicate there's no prediction possible on a branch. This causes the compiler to select branchless instructions & is particularly useful in things like binary search where the CPU attempting to do prediction is worse than using a branchless version of the code.