Push vs length (v33)

Revision 33 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
 var methodsCol = new Array();
otherArray = Object.create(methodsCol )


otherArray[myArray.length] = 'foo';
myArray.length++;
ready
push
var myArray = [];

myArray[myArray.length] = 'foo';

myArray.whatever = "whatever "
myArray.whatever1 = "whatever "
myArray.whatever2 = "whatever "
myArray.whatever3 = "whatever "
myArray.whatever4 = "whatever "
myArray.whatever5 = "whatever "
ready

Revisions

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