Push vs length (v19)

Revision 19 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
length
var myArray = [];
for (i = 0; i <= 1000; i++) {
  myArray[i] = i;
}
ready
push
var myArray = [];
for (i = 0; i <= 1000; i++) {
  myArray.push(i);
}
ready
third
var myArray = [];
for (i = 0; i <= 1000; myArray[i++] = i) {}
ready

Revisions

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