Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134
Linux
Desktop
one year ago
Benchmark.js
Set length to zero
15K/s
Just instantiate new array
15K/s
Splice
14K/s
Pop all values
10K/s
View exact numbers
Test name Executions per second
Set length to zero 15,007 Ops/sec
Just instantiate new array 14,983 Ops/sec
Splice 14,193 Ops/sec
Pop all values 10,029 Ops/sec
Tests: