Zero filled array creation (v6)

Revision 6 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Array push
for (var i = 0, a = []; i < 100; i++) a.push(0);
ready
Array assign - for
for (var i = 0, a = new Array(100); i < 100;) a[i++] = 0;
ready
Array assign - for
for (var i = 0, a = new Array(100); 100 > i; i++) a[i] = a[i] ^ a[i];
ready
Array assign - for
for (var i = -1, a = new Array(100); i < 100;) a[++i] = 0;
ready

Revisions

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