push vs index (v14)

Revision 14 of this benchmark created on


Setup

var arr = [];

Teardown


    arr.length = 0;
  

Test runner

Ready to run.

Testing in
TestOps/sec
index
for (var i = 1; i < 1000; i++)
{
    arr[i] = i;
}
ready
push
for (var i = 1; i < 1000; i++)
{
    arr.push(i);
}
ready

Revisions

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