title: Iteration speed and element size
body: <p>I have a <code>std::vector</code> filled with following structures: </p>
  
  <pre><code>#define ELEMENTSIZE 8
  
  struct Element {
  int value;
  char size[ELEMENTSIZE - 4]; //1 char is 1B in size - 4B int
  }; 
  </code></pre>
  
  <p>The size of structure depends on defined elementsize, which makes an array of chars of specified size in the structure.</p>
  
  <p>I am benchmarking an average value of these structures in vector and I would love to know the reason why vector filled with bigger structures in size takes longer to iterate over. </p>
  
  <p>For example vector with 1 000 000 8B structures takes roughly 1,7ms and the same test with 128B structures 12,7ms.</p>
  
  <p>Is that big difference because of cache only? If so, could you explain why? Or is there any other aspect that I can not see? </p>