Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0
Chrome 129
Windows
Desktop
one year ago
Benchmark.js
Set length to zero
34K/s
Just instantiate new array
34K/s
Splice
32K/s
Pop all values
19K/s
View exact numbers
Test name Executions per second
Set length to zero 34,457 Ops/sec
Just instantiate new array 34,153 Ops/sec
Splice 31,853 Ops/sec
Pop all values 19,368 Ops/sec
Tests: