Run details:
Mozilla/5.0 (Android 14; Mobile; rv:127.0) Gecko/127.0 Firefox/127.0
Firefox Mobile 127
Android
Mobile
6 months ago
Test name Executions per second
.forEach 12.1 Ops/sec
for..of 11.5 Ops/sec
for..of (destructuring) 11.3 Ops/sec
.map 11.1 Ops/sec
.map (destructuring) 10.1 Ops/sec
.for (init array) 11.4 Ops/sec
.reduce 10.6 Ops/sec
.reduce (destructuring) 11.4 Ops/sec
for..of (reduce) 11.1 Ops/sec
for..of (reduce) (destructuring) 11.0 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)