Script Preparation code:
AخA
 
var array = [0, 1, 2, 3];
Tests:
  • array.prototype.at()

     
    let lastWithAtArray = array.at(-1)
  • array[array.length - 1]

     
    let lastWithLength = array[array.length - 1]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array.prototype.at()
    array[array.length - 1]

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 14 days ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Linux
View result in a separate tab
Test name Executions per second
array.prototype.at() 159928672.0 Ops/sec
array[array.length - 1] 176036736.0 Ops/sec