1bi nested loop iterations

Benchmark created on


Description

why

Test runner

Ready to run.

Testing in
TestOps/sec
sparse array (wtf)
let array = new Array(10000);
for (let i = 0; i < 10000; i++) {
  for (let j = 0; j < 100000; j++) {
    array[i] = array[i] + j;
  }
}
ready
int32array
let array = new Int32Array(10000);
for (let i = 0; i < 10000; i++) {
  for (let j = 0; j < 100000; j++) {
    array[i] = array[i] + j;
  }
}
ready
non-sparse array
let array = new Array(10000).fill(0);
for (let i = 0; i < 10000; i++) {
  for (let j = 0; j < 100000; j++) {
    array[i] = array[i] + j;
  }
}
ready
non-sparse array, var
var array = new Array(10000).fill(0);
for (var i = 0; i < 10000; i++) {
  for (var j = 0; j < 100000; j++) {
    array[i] = array[i] + j;
  }
}
ready
int32array, var
var array = new Int32Array(10000);
for (var i = 0; i < 10000; i++) {
  for (var j = 0; j < 100000; j++) {
    array[i] = array[i] + j;
  }
}
ready

Revisions

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