title: Is there a performance difference between a for loop and a for-each loop?
body: <p>What, if any, is the performance difference between the following two loops?</p>
  
  <pre><code>for (Object o: objectArrayList) {
      o.DoSomething();
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>for (int i=0; i&lt;objectArrayList.size(); i++) {
      objectArrayList.get(i).DoSomething();
  }
  </code></pre>