Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0
Chrome 129
Windows
Desktop
one year ago
Benchmark.js
Just instantiate new array
40K/s
Set length to zero
40K/s
Splice
36K/s
Pop all values
23K/s
View exact numbers
Test name Executions per second
Just instantiate new array 40,022 Ops/sec
Set length to zero 39,761 Ops/sec
Splice 36,102 Ops/sec
Pop all values 22,935 Ops/sec
Tests: