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 7784635.0 Ops/sec
Set length to zero 6402263.5 Ops/sec
Splice 3030828.5 Ops/sec
Slice 3540259.8 Ops/sec
splice 0 4118279.8 Ops/sec
Script Preparation code:
Tests:
  • Just instantiate new array

  • Set length to zero

  • Splice

  • Slice

  • splice 0