Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Chrome 59
Mac OS X 10.11.6
Other
7 years ago
Test name Executions per second
for..in 79119.3 Ops/sec
foreach 666035.4 Ops/sec
some 3792371.2 Ops/sec
for 59722.3 Ops/sec
for with predefined size 120481.7 Ops/sec
while 1738563.2 Ops/sec
every 7027113.5 Ops/sec
Script Preparation code:
Tests:
  • for..in

  • foreach

  • some

  • for

  • for with predefined size

  • while

  • every