Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Linux
Desktop
one year ago
Test name Executions per second
Array.forEach (native) 1305.6 Ops/sec
lodash _.each 1286.1 Ops/sec
Array.map (native, discarding result) 767.8 Ops/sec
lodash _.map (discarding result) 625.5 Ops/sec
for loop (x of arr) 1138.8 Ops/sec
for loop (indexed) 6430.2 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)


;