pre-allocated arrays (v54)

Revision 54 of this benchmark created by Peter on


Test runner

Ready to run.

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

Revisions

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