Script Preparation code:
Tests:
  • Array.indexOf()

  • For loop

  • For loop without break

  • Array.indexOf() reversed

  • Array.includes()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Array.indexOf()
    For loop
    For loop without break
    Array.indexOf() reversed
    Array.includes()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Firefox 58 on Windows
View result in a separate tab
Test name Executions per second
Array.indexOf() 3341791.2 Ops/sec
For loop 16924544.0 Ops/sec
For loop without break 14566753.0 Ops/sec
Array.indexOf() reversed 11471107.0 Ops/sec
Array.includes() 3083388.5 Ops/sec


;