pre-allocated arrays (v15)

Revision 15 of this benchmark created on


Setup

var arr = [];
  
  var size = 100;
  var arr2 = new Array(size);

Test runner

Ready to run.

Testing in
TestOps/sec
empty literal
for (var i = 0; i < size; i++) {
  arr[i] = i;
}
ready
pre-allocated array
for (var i = 0; i < size; i++) {
  arr2[i] = i;
}
ready

Revisions

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