Array.push vs index (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Index
const arr = []
for (var i = 0; i < 10; i++) {
   arr[i] = i
}


ready
Array.prototype.push()
const arr = []
for (var i = 0; i < 10; i++) {
   arr.push(i)
}


ready

Revisions

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