Script Preparation code:
Tests:
  • Int16Array: for..of

  • Plain JS array: for..of

  • Int16Array: for index

  • Plain JS array: for index

  • Int16Array: Array reduce: Arrow Function

  • Plain JS array: Array reduce: Arrow Function

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Int16Array: for..of
    Plain JS array: for..of
    Int16Array: for index
    Plain JS array: for index
    Int16Array: Array reduce: Arrow Function
    Plain JS array: Array reduce: Arrow Function

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 OPR/102.0.0.0
Opera 102 on Windows
View result in a separate tab
Test name Executions per second
Int16Array: for..of 3490139.2 Ops/sec
Plain JS array: for..of 11216050.0 Ops/sec
Int16Array: for index 272903.0 Ops/sec
Plain JS array: for index 272229.9 Ops/sec
Int16Array: Array reduce: Arrow Function 1861762.2 Ops/sec
Plain JS array: Array reduce: Arrow Function 1865037.0 Ops/sec