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 47526.3 Ops/sec
foreach 2411868.5 Ops/sec
for in 2281000.8 Ops/sec
for..of 76070.9 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • for in

  • for..of


;