Hacker News new | ask | show | jobs
by layer8 1032 days 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.