Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
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,358 Ops/sec
Just instantiate new array 15,227 Ops/sec
Splice 13,872 Ops/sec
Pop all values 10,260 Ops/sec
Tests: