I have always had the idea that reducing the number of iterations is the way to making programs more efficient. Since I never really confirmed that, I set out to te
The thing you gain from a single loop, is the fact that you lose the incrememnting of the loop variable. So in a case like this where the content of the loop is so trivial, that assignment (and test) makes a big difference.
What your example fails to take into consideration also; is that contiguous memory access will often be faster than random access.
In a function where the loop takes much longer (try putting a sleep in rather than assignment) you'll find that the difference works it's way into not a lot.
THE way to get performance improvements is to start with the Maths - the right algorithm will always buy the biggest improvements. This is done, ideally, before finger hits keyboard.