Array clear methods

Benchmark created by Sergej on


Test runner

Ready to run.

Testing in
TestOps/sec
length=0
var a = [];
for (i = 1; i < 100000; i++) {
  a.length = 0;
  a.push(i);
}
ready
redefine
var a;
for (i = 1; i < 100000; i++) {
  a = [];
  a.push(i);
}
ready

Revisions

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