test Array.from, for loop

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array.from
Array.from({ length: 100 }, (_, i) => `https://jsonplaceholder.typicode.com/todos/${i + 1}`);
ready
for loop
let array = [];
for (let i = 1; i <= 100; i++) {
  array.push(`https://jsonplaceholder.typicode.com/todos/${i}`);
}
array;
ready

Revisions

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