Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
one year ago
Benchmark.js
Set length to zero
27K/s
Just instantiate new array
26K/s
Splice
26K/s
Pop all values
22K/s
View exact numbers
Test name Executions per second
Set length to zero 26,631 Ops/sec
Just instantiate new array 26,219 Ops/sec
Splice 25,534 Ops/sec
Pop all values 21,880 Ops/sec
Tests: