Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 OPR/99.0.0.0
Opera 99
Windows
Desktop
one year ago
Test name Executions per second
Array.forEach (native) 3874.6 Ops/sec
lodash _.each 1744.3 Ops/sec
Array.map (native, discarding result) 1074.4 Ops/sec
lodash _.map (discarding result) 2287.1 Ops/sec
for loop (x of arr) 11002.5 Ops/sec
for loop (indexed) 106.6 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)


;