Script Preparation code:
x
 
var arr = [];
for (var i = 0; i < 1000; i++) {
  arr.push({
    Number: i
  });
};
var e = null;
var f = null;
function doWork(o, i) {
  e = o;
};
Tests:
  • 1

     
    for (var i = 0, len = arr.length; i <= len; i++) {
      e = arr[i];
    };
  • 2

     
    var i = 0;
    var len = arr.length;
    for (; i <= len; i++) {
      f = arr[i];
    };
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    1
    2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Chrome 59 on Linux
View result in a separate tab
Test name Executions per second
1 3950.9 Ops/sec
2 4116.1 Ops/sec