Array for vs fill 1e7

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array fill
const A = Array(1e7).fill(0)
ready
Array for
const A = []
for( var i = 0; i < 1e7; i++) {
   A[i] = 0;
}
ready

Revisions

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