Array perf

Benchmark created on


Setup

let a = new Array(1000);

Test runner

Ready to run.

Testing in
TestOps/sec
Access using array index
let v = 1;
for(var i = 0; i < a.length - 1; i++) {
	a[i] = v++;
}
ready
Using object
let v = 1;
for(i of a) {
	i = v++;
}
ready

Revisions

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