Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Chrome 86
Mac OS X 10.15.7
Desktop
4 years ago
Test name Executions per second
for..in 106071.3 Ops/sec
foreach 9359819.0 Ops/sec
some 7305393.5 Ops/sec
for 75060.8 Ops/sec
for with predefined size 138570.6 Ops/sec
while 2687339.5 Ops/sec
Script Preparation code:
Tests:
  • for..in

  • foreach

  • some

  • for

  • for with predefined size

  • while