loop comparison arm

Benchmark created by Armen Mshetsuan on


Description

description

Setup

var a = [];
    a[1000000] = 10;
    var b = 0;

Teardown


    console.log(b)
  

Test runner

Ready to run.

Testing in
TestOps/sec
for loop
for (var i = 0; i < a.length; i++) {
  b++
}
ready
foreach loop
a.forEach(function(){}, a)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Armen Mshetsuan on