Array preallocation test

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
No allocation
arr = []
for (let i = 0; i < 80000; i++) {
	arr.push({ "id": i })
}
ready
Preallocated
arr = new Array(80000)
for (let i = 0; i < 80000; i++) {
	arr[i] = { "id": i }
}
ready

Revisions

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