for test cases

JavaScript performance comparison

Test case created by mercxry

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  const arrayTest = new Array(2**16).fill(1);

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Optimized for
for (let i = 0, l = arrayTest.length; i < l; i++) {}
pending…
for
for (let i = 0; i < arrayTest.length; i++) {}
pending…
Worst for version
for (let i = arrayTest.length; i-- > 0;) {};
pending…
.forEach
arrayTest.forEach(() => {});
pending…
for..of
for (let i of arrayTest) {}
pending…
for..in
for (let i in arrayTest) {}
pending…

Compare results of other browsers

Revisions

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

0 Comments