Run details:
Mozilla/5.0 (Linux; Android 10; MI 8 Lite) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Mobile Safari/537.36
Chrome Mobile 100
Android
Mobile
2 years ago
Test name Executions per second
array[array.length - 1] 2075423.8 Ops/sec
array.at(-1) 2628987.8 Ops/sec
array[array.length + -1] 2052739.6 Ops/sec
Script Preparation code:
Tests:
  • array[array.length - 1]

  • array.at(-1)

  • array[array.length + -1]