Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Linux
Desktop
2 years ago
Benchmark.js
Set length to zero
28K/s
Just instantiate new array
25K/s
Splice
21K/s
Pop all values
17K/s
View exact numbers
Test name Executions per second
Set length to zero 27,771 Ops/sec
Just instantiate new array 25,115 Ops/sec
Splice 21,489 Ops/sec
Pop all values 17,029 Ops/sec
Tests: