Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Chrome 63
Mac OS X 10.13.1
Other
2025 years ago
Test name Executions per second
Just instantiate new array 8189194.0 Ops/sec
Set length to zero 6453391.5 Ops/sec
Splice 2941939.5 Ops/sec
Pop all values 12033162.0 Ops/sec
splice 0 3905243.2 Ops/sec
Script Preparation code:
Tests:
  • Just instantiate new array

  • Set length to zero

  • Splice

  • Slice

  • splice 0