3 ms·
Without branch prediction and speculative execution, performance would always be as bad as with a misprediction. So every correct prediction is a win, and that’
by layer8 3y ago
Without branch prediction and speculative execution, performance would always be as bad as with a misprediction. So every correct prediction is a win, and that’s why it’s being done.
> My broad takeaway of the whole ordeal is that I'm basically avoiding if-statements these days.
That seems like an overreaction. For most applications, cache locality and using the right algorithms is more important, if performance is an issue at all.