Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126
Windows
Desktop
6 months ago
Test name Executions per second
.forEach 28.7 Ops/sec
for..of 28.0 Ops/sec
for..of (destructuring) 25.2 Ops/sec
.map 26.1 Ops/sec
.map (destructuring) 25.7 Ops/sec
.for (init array) 27.5 Ops/sec
.reduce 29.2 Ops/sec
.reduce (destructuring) 28.9 Ops/sec
for..of (reduce) 28.7 Ops/sec
for..of (reduce) (destructuring) 29.2 Ops/sec
Script Preparation code:
Tests:
  • .forEach

  • for..of

  • for..of (destructuring)

  • .map

  • .map (destructuring)

  • .for (init array)

  • .reduce

  • .reduce (destructuring)

  • for..of (reduce)

  • for..of (reduce) (destructuring)