Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Windows
Desktop
one year ago
Test name Executions per second
Map 24.1 Ops/sec
For Loop 13.2 Ops/sec
foreach 166.0 Ops/sec
pre-allocated for loop 14.1 Ops/sec
pre-allocated unrolled for loop 21.8 Ops/sec
Script Preparation code:
Tests:
  • Map

  • For Loop

  • foreach

  • pre-allocated for loop

  • pre-allocated unrolled for loop