Script Preparation code:
Tests:
  • Classic for loop

  • Optimised classic for loop

  • While loop

  • Optimised while loop

  • Array.prototype.forEach

  • Array.prototype.reduce

  • For - of loop

  • For - in loop

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Classic for loop
    Optimised classic for loop
    While loop
    Optimised while loop
    Array.prototype.forEach
    Array.prototype.reduce
    For - of loop
    For - in loop

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Classic for loop 15152.5 Ops/sec
Optimised classic for loop 28270.7 Ops/sec
While loop 15154.4 Ops/sec
Optimised while loop 28216.8 Ops/sec
Array.prototype.forEach 271921.3 Ops/sec
Array.prototype.reduce 2686007.5 Ops/sec
For - of loop 733112.5 Ops/sec
For - in loop 22517.9 Ops/sec