array vs []

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array
Array(10).fill(1)
ready
[]
const arr = []
for (let i = 0; i < 10; i++) {
	arr.push(1)
}
ready

Revisions

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