Run details:
Mozilla/5.0 (Linux; Android 13; M2103K19PG Build/TP1A.220624.014) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36
Chrome Mobile 118
Android
Mobile
one year ago
Test name Executions per second
.forEach 6.7 Ops/sec
for..of 2.5 Ops/sec
for..of (destructuring) 5.6 Ops/sec
.map 2.8 Ops/sec
.map (destructuring) 3.5 Ops/sec
.for (init array) 8.9 Ops/sec
.reduce 6.7 Ops/sec
.reduce (destructuring) 6.4 Ops/sec
for..of (reduce) 2.2 Ops/sec
for..of (reduce) (destructuring) 2.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)