2 ms·
I agree that we should be able to tell the processor which branch is more likely. Even something as simple as a flag to select between "I prefer you take any ju
by loa_in_ 7y ago
I agree that we should be able to tell the processor which branch is more likely. Even something as simple as a flag to select between "I prefer you take any jump you encounter" and "I prefer you skip all jumps in this macroblock for speculation purposes" (and also "try to predict smartly" to stick to how it's working now, aka what this article is about). This would give a determined programmer everything he needs to make sure his program is executed optimally.
- gamozolabs 7y agoBack in Pentium 4 days you could use the DS and CS override prefixes on conditional branches to hint taken and not taken, respectively. Kinda neat, but it's not a thing anymore. Some more info here: https://stackoverflow.com/questions/14332848/intel-x86-0x2e-0x3e-prefix-branch-prediction-actually-used https://stackoverflow.com/questions/14332848/intel-x86-0x2e-...