In C++ STL containers specifically (i.e. vector), you’ve three methods for accessing data inside it, using iterators, indexers or at operator.So, the question is, when accessing data inside a container, which method to use?
Using an iterator results in incrementing a pointer (for incrementing) and for dereferencing into dereferencing a pointer.
With an index, incrementing should be equally fast, but looking up an element involves an addition (data pointer+index) and dereferencing that pointer, but the difference should be marginal.
Benchmark results for 500M iterations, vector size 10, with gcc 4.3.3 (-O3), linux 22.214.171.124 x86_64:
I think the only answer could be a test on your platform. Generally the only thing which is standardized in the STL is the type of iterators a collection offers and the complexity of algorithms.
I would say that there is no (not much of a difference) between those two versions- the only difference I could think of would be tjat the code has to iterate through the whole collection when it has to compute the length of an array (I’m not sure if the length is stored in a variable inside the vector, then the overhead wouldn’t matter)
Accessing the elements with “at” should take a little bit longer than directly accessing it with  because it checks if you are in the bounds of the vector and throws an exception if you are out of bounds (it seems  is normally just using pointer arithmetic – so it should be faster)
The most you gain from using an iterator is that your code is ready for nearly all STL-containers. So if you decide your vector should have been a list, you can simply switch the declaration, and need not touch all the places where you iterate through the list (especially if you used a typedef).