Push vs length (v32)

Revision 32 of this benchmark created on


Preparation HTML

var myArray = [];

Setup

var myArray = [];
   var methodsCol = new Array();
  otherArray = Object.create(methodsCol )

Test runner

Ready to run.

Testing in
TestOps/sec
length
otherArray[myArray.length] = 'foo';
myArray.length++;
ready
push
myArray[myArray.length] = 'foo';
ready

Revisions

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