Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
Array.forEach (native) 1255.5 Ops/sec
lodash _.each 1436.9 Ops/sec
Array.map (native, discarding result) 950.5 Ops/sec
lodash _.map (discarding result) 2298.8 Ops/sec
for loop (x of arr) 11447.8 Ops/sec
for loop (indexed) 86.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.forEach (native)

  • lodash _.each

  • Array.map (native, discarding result)

  • lodash _.map (discarding result)

  • for loop (x of arr)

  • for loop (indexed)


;