Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Mac OS X 10.13.6
Desktop
2 years ago
Test name Executions per second
for 44373.0 Ops/sec
foreach 2281752.0 Ops/sec
for in 2158705.0 Ops/sec
for..of 70998.2 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • for in

  • for..of