Script Preparation code:
AخA
 
var arr = Array.from(Array(100).keys());
Tests:
  • `Array.slice`

     
    arr.slice(-1)[0];
  • `Array.length-1`

     
    arr[arr.length - 1];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    `Array.slice`
    `Array.length-1`

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 11 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
`Array.slice` 27681456.0 Ops/sec
`Array.length-1` 21536700.0 Ops/sec