Script Preparation code:
AخA
 
var a = Array(100_000_000).fill(1);
Tests:
  • [i]

     
    let total = 0;
    for (let i = 0; i < a.length; i++) {
      total += a[i];
    }
  • .at(i)

     
    let total = 0;
    for (let i = 0; i < a.length; i++) {
      total += a.at(i);
    }
  • ?.[i]

     
    let total = 0;
    for (let i = 0; i < a.length; i++) {
      total += a?.[i];
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    [i]
    .at(i)
    ?.[i]

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Android 13; Mobile; rv:108.0) Gecko/108.0 Firefox/108.0
Firefox Mobile 108 on Android
View result in a separate tab
Test name Executions per second
[i] 6.0 Ops/sec
.at(i) 4.2 Ops/sec
?.[i] 4.5 Ops/sec