title: Does the operator [] of std::vector<type> walk through the vector from the beginning on each call
body: <p>I see many programmers using <code>std::vector&lt;type&gt;::operator[]</code>  to access the vector's elements in a <code>for</code> loop this way :</p>
  
  <pre><code>for (int c=0;c&lt;vect.size();c++)
  {
     vect[c] ....
  }
  </code></pre>
  
  <p>but when i use ieterators i get a better performance can you explain why ?</p>
  
  <pre><code>for (std::vector&lt;type&gt;::iterator it = vect.begin();it&lt;vect.end();it++)
  {
    *it = ...
  ]
  </code></pre>
  
  <p>a possible reason that can be wrong it that the operator <code>[]</code> works like in the case of a linked list , it is navigating through the vector till reaching the element of the desired index</p>