Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36 OPR/41.0.2353.69
Opera 41
Windows
Other
8 years ago
Test name Executions per second
for..in 44563.8 Ops/sec
foreach 428491.3 Ops/sec
some 3183636.2 Ops/sec
for 45513.3 Ops/sec
for with predefined size 91986.5 Ops/sec
while 1548682.4 Ops/sec
Script Preparation code:
Tests:
  • for..in

  • foreach

  • some

  • for

  • for with predefined size

  • while