Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.58 Safari/537.36
Chrome 89
Mac OS X 11.1.0
Desktop
3 years ago
Test name Executions per second
for 79103.2 Ops/sec
foreach 3694190.0 Ops/sec
some 4102351.8 Ops/sec
for..of 113586.3 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • some

  • for..of


;