pre-allocated arrays (v40)

Revision 40 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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