Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
13 hours ago
Test name Executions per second
for 6457.8 Ops/sec
for (with defined iterator) 6492.6 Ops/sec
for (with defined iterator and iterator limit) 12805.6 Ops/sec
for of 11750.0 Ops/sec
for in 1196290.4 Ops/sec
forEach 1165118.8 Ops/sec
do while 6450.9 Ops/sec
do while (with defined iterator limit) 12706.9 Ops/sec
while 6345.5 Ops/sec
while (with defined iterator limit) 12619.9 Ops/sec
Script Preparation code:
Tests:
  • for

  • for (with defined iterator)

  • for (with defined iterator and iterator limit)

  • for of

  • for in

  • forEach

  • do while

  • do while (with defined iterator limit)

  • while

  • while (with defined iterator limit)


;