Array clear methods (v4)

Revision 4 of this benchmark created on


Setup

var a = [];
  for (i = 1; i < 1000000; i++) {
    a.push({value: i, name:"asdf"});
  }

Test runner

Ready to run.

Testing in
TestOps/sec
length=0
a.length = 0;
ready
redefine
a = [];
ready
a.pop();
while(a.length > 0) {
    a.pop();
}
ready
 
ready

Revisions

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