ORLY?
<div id='res'>
</div>
<script>
var arr = [], l = 1e6, time;
time = Date.now();
for (i = 0; i < l; i+=1) arr[i] = i
document.getElementById('res').innerHTML += "<br>" + (Date.now() - time)
time = Date.now()
for (i = 0; i < l; i++) arr[i] = i
document.getElementById('res').innerHTML += "<br>" + (Date.now() - time)
</script>
Немного пищи для размышлений:
<div id='res'>
</div>
<script>
var arr = [], l = 1e6, time, element = document.getElementById('res');
time = Date.now();
for (i = 0; i < l; i+=1) arr[i] = i
element.innerHTML += "<br>" + (Date.now() - time)
time = Date.now()
for (i = 0; i < l; i++) arr[i] = i
element.innerHTML += "<br>" + (Date.now() - time)
time = Date.now()
for (i = 0; i < l; ++i) arr[i] = i
element.innerHTML += "<br>" + (Date.now() - time)
time = Date.now();
for (i = 0; i < l; i+=1) arr[i] = i
element.innerHTML += "<br>" + (Date.now() - time)
</script>
Хватит думать, что Вы умнее компилятора.