pre-allocated arrays (v10)

Revision 10 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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