Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Linux
Desktop
one year ago
Benchmark.js
Set length to zero
27K/s
Just instantiate new array
26K/s
Splice
25K/s
Pop all values
16K/s
View exact numbers
Test name Executions per second
Set length to zero 26,554 Ops/sec
Just instantiate new array 26,405 Ops/sec
Splice 24,541 Ops/sec
Pop all values 16,118 Ops/sec
Tests: