Empty array (v2)

Revision 2 of this benchmark created by Simon on


Setup

var arr = [];

Test runner

Ready to run.

Testing in
TestOps/sec
length
arr.length = 0;
for(var i=0; i<1000; i++) arr.push({a: 1, b: "2"});
ready
arr = null
arr = [];
for(var i=0; i<1000; i++) arr.push({a: 1, b: "2"});
ready
delete arr
delete arr;
arr = [];
for(var i=0; i<1000; i++) arr.push({a: 1, b: "2"});
ready
arr = []
arr = null;
arr = [];
for(var i=0; i<1000; i++) arr.push({a: 1, b: "2"});
ready

Revisions

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