Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Windows
Desktop
one year ago
Test name Executions per second
Array.forEach (native) 778.6 Ops/sec
lodash _.each 925.7 Ops/sec
Array.map (native, discarding result) 530.1 Ops/sec
lodash _.map (discarding result) 1023.3 Ops/sec
for loop (x of arr) 6237.7 Ops/sec
for loop (indexed) 36.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)


;