Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0
Firefox 109
Ubuntu
Desktop
one year ago
Test name Executions per second
Array.forEach (native) 1338.8 Ops/sec
lodash _.each 1341.8 Ops/sec
Array.map (native, discarding result) 526.9 Ops/sec
lodash _.map (discarding result) 527.1 Ops/sec
for loop (x of arr) 1398.0 Ops/sec
for loop (indexed) 12447.5 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)


;