Script Preparation code:
x
 
function test() {
    var v = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        v[_i] = arguments[_i];
    }
  var different = false;
  for (var j = 0; j < v.length; j++) {
    if (j % 2 === 0) different = true;
  }
  return different;
}
function test2(v) {
  var different = false;
  for (var j = 0; j < v.length; j++) {
    if (j % 2 === 0) different = true;
  }
  return different;
}
Tests:
  • arguments

     
    for(var i = 0; i < 10000; i++) {
      test(i, i + 1, i + 2, i + 3, i + 4, i + 5);
    }
  • array arg

     
    for(var i = 0; i < 10000; i++) {
      test2([i, i + 1, i + 2, i + 3, i + 4, i + 5]);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    arguments
    array arg

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2025 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0
Firefox 58 on Mac OS X 10.12
View result in a separate tab
Test name Executions per second
arguments 2481.7 Ops/sec
array arg 10435.5 Ops/sec