Say, I have a
std::vector v;
in my code and I need to access its elements very often in the program, looping them forwa
A simple loop-based benchmark has been fulfilled. I used VS 2010 SP1 (release configuration).
In several billions of iterations the second approach turned out to be a bit faster, by 1%. The result (indices are slightly faster than iterators) is reproducible but the difference, as I said, is very small.