Array fill vs for 1e3 (v17)

Revision 17 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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