Script Preparation code:
Tests:
  • Just instantiate new array

  • Set length to zero

  • Splice

  • Slice

  • splice 0

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Just instantiate new array
    Set length to zero
    Splice
    Slice
    splice 0

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 2024 years ago)
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 on Mac OS X 10.13.1
View result in a separate tab
Test name Executions per second
Just instantiate new array 8189194.0 Ops/sec
Set length to zero 6453392.0 Ops/sec
Splice 2941940.0 Ops/sec
Pop all values 12033160.0 Ops/sec
splice 0 3905243.0 Ops/sec