Test case name | Result |
---|---|
while (array.length > 0) { array.pop(); } | |
while (array.pop()) {} | |
array.length = 0; | |
array = []; |
Test name | Executions per second |
---|---|
while (array.length > 0) { array.pop(); } | 7517485.0 Ops/sec |
while (array.pop()) {} | 7453645.0 Ops/sec |
array.length = 0; | 4427535.0 Ops/sec |
array = []; | 5202380.0 Ops/sec |