Emptying an array with splice testcase (v16)

Revision 16 of this benchmark created on


Setup

var arr = ['apples', 'pears', 'oranges', 'lemons', 'kiwis', 'bananas', 'strawberries', 'grapefruits', 'pineapples', 'satsumas', 'lychees'];

Test runner

Ready to run.

Testing in
TestOps/sec
Setting .length to 0
eval('arr.length = Math.random(), 0');
ready
Creating a new empty array
eval('arr = [Math.random()]');
ready

Revisions

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