Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Windows
Desktop
2 years ago
Benchmark.js
Set length to zero
28K/s
Just instantiate new array
28K/s
Splice
25K/s
Pop all values
16K/s
View exact numbers
Test name Executions per second
Set length to zero 28,280 Ops/sec
Just instantiate new array 28,009 Ops/sec
Splice 25,474 Ops/sec
Pop all values 15,971 Ops/sec
Tests: