Array emptying

Benchmark created on


Setup

var a = Array();
    for (var i = 0; i < 10000; i++)
    {
       a.push(i);
    }

Test runner

Ready to run.

Testing in
TestOps/sec
splice
a.splice(0)
ready
reinit
a = []
ready
length
a.length = 0
ready

Revisions

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