Filling array

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Fill and map
new Array(100).fill('').map((_, i) => { return i + i; });
ready
For loop
const arr = [];
for (let i = 0; i < 100; i++) {
  arr.push(i + i);
}
ready

Revisions

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