push allocated vs dynamic

JavaScript performance comparison

Revision 70 of this test case created by Steve Campbell

Preparation code

Benchmark.prototype.setup = function() {
  var n=10000;
  var myArray = [];
  var myArray2 = new Array(n);


Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
push to empty
for (var i=0; i<n; i++) { myArray.push(i) }


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