Empty true array (v78)

Revision 78 of this benchmark created by Ray Brooks on


Setup

var buffer = new ArrayBuffer(384);
    var arr = new Int16Array(buffer);
    for (i = 0; i < arr.length; i++) {
      console.log(arr[i]);
    }

Teardown


    buffer = null;
    arr = null;
    i = 0;
  

Test runner

Ready to run.

Testing in
TestOps/sec
length
arr.length = 0;
ready
splice
arr = arr.subarray(0, arr.length - 1);
ready
new
arr = []
ready

Revisions

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