Array fill vs for 1e7 (v4)

Revision 4 of this 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.