Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Firefox 51
Windows
Other
8 years ago
Test name Executions per second
Map 123.0 Ops/sec
For Loop 89.3 Ops/sec
foreach 2106.8 Ops/sec
pre-allocated for loop 82.9 Ops/sec
pre-allocated unrolled for loop 103.2 Ops/sec
Script Preparation code:
Tests:
  • Map

  • For Loop

  • foreach

  • pre-allocated for loop

  • pre-allocated unrolled for loop