Test

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
For loop
const arr = []
for(let i = 0; i < 100; i++) {
	arr.push(i + 1)
}
ready
Array from
const arr = Array.from({length: 100}, (_, i) => i + 1)


ready
Array fill
const arr = Array(100).fill(null).map((_, i) => i + 1)
ready
Array keys
const arr = [...Array(100).keys()]
ready
Array keys array from
const arr = Array.from(Array(100).keys())
ready
Array from Array
const arr = Array.from(Array(100), (_, i) => i + 1) 
ready

Revisions

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