Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Linux
Desktop
8 months ago
Test name Executions per second
Array.forEach (native) 3487.8 Ops/sec
lodash _.each 993.8 Ops/sec
Array.map (native, discarding result) 577.8 Ops/sec
lodash _.map (discarding result) 611.7 Ops/sec
for loop (x of arr) 5447.5 Ops/sec
for loop (indexed) 75.3 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)


;