Branch predictor: How many “if”s are too many?
Are there any rules-of-thumb for avoiding branch mispredictions, other than reducing the number of conditional branches?For example (not that I expect this to be true), something of the same sort as "your if block should contain the rare condition".