Script Preparation code:
x
 
var array = [];
for(var i = 0; i < 100000; i++){array.push(Math.random());}
Tests:
  • Shift

     
    const i = array.shift();
  • [0]

     
    const i = array[0];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Shift
    [0]

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Windows
View result in a separate tab
Test name Executions per second
Shift 31825286.0 Ops/sec
[0] 30320380.0 Ops/sec