http://jsperf.com/testing-foreach-vs-for-loop
It was my understanding that Test Case 2 should run more slowly than Test Case 1 -- I wanted to see how much more slowly. I
They're approximately the same for me in Opera. Something to note is that your conditional in the for() is array.length. If you cache the length of the array in a variable, and then loop, you should see better performance.