Script Preparation code:
Tests:
  • For i++ (const size)

  • For i++ (.length)

  • For ... in

  • for ... of

  • indexOf

  • findIndex

  • Includes

  • Some ?

  • forEach

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    For i++ (const size)
    For i++ (.length)
    For ... in
    for ... of
    indexOf
    findIndex
    Includes
    Some ?
    forEach

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0
Firefox 105 on Windows
View result in a separate tab
Test name Executions per second
For i++ (const size) 201063.5 Ops/sec
For i++ (.length) 198844.5 Ops/sec
For ... in 718.1 Ops/sec
for ... of 12364.1 Ops/sec
indexOf 236898.1 Ops/sec
findIndex 32259.1 Ops/sec
Includes 236380.7 Ops/sec
Some ? 33754.7 Ops/sec
forEach 23068.8 Ops/sec