empty array

Benchmark created by etienne on


Description

test severals technics to empty an array

Preparation HTML

<script>
  var testAr = [],
      i = 0;
  for (i; i < 1000; i++) {
   testAr[i] = "test" + i;
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
splice(1,array.length);
testAr.splice(1, testAr.length);
ready
length=0
testAr.length = 0;
ready

Revisions

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

  • Revision 1: published by etienne on