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

  • For i++ (.length)

  • For ... in

  • for ... of

  • indexOf

  • findIndex

  • Includes

  • Some ?

  • forEach

  • set has

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
    set has

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Chrome 97 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
For i++ (const size) 1097.5 Ops/sec
For i++ (.length) 796.8 Ops/sec
For ... in 1000.2 Ops/sec
for ... of 2123.0 Ops/sec
indexOf 70193.6 Ops/sec
findIndex 2056.2 Ops/sec
Includes 147328.5 Ops/sec
Some ? 2119.3 Ops/sec
forEach 1212.4 Ops/sec
set has 2457.0 Ops/sec