Your example embodies the difference between unrolling a loop and having genuine flow control/branching support in hardware. The variable in your example means that the itterations are unpredictable and require a little bit of additional smarts in the compiler to detect the ‘3’ and see that it doesn’t change, (making it const basically tells the computer that it will not change, i.e. it’s not really variable). Of course the motivation for the 3 is the desire to have a genuinely variable number of itterations and that is the root problem, without some form of flow control it cannot be done unless software fallback or some other inefficient approach is taken.