Branch density is especially within loops, then again (especially if the optimizing if the optimizing compiler has anything to say about) loops make branch prediction easier! They can even make dynamic branches easier to predict!
So GCC at least has a whole suite of optimization passes dedicated to shrinking loopbody sizes & minimizing loop iterations (again vector instructions are very handy here), especially for inner loops.
Replacing finite loops with duplicate straightline code helps.
4/6