Run details:
Mozilla/5.0 (Linux; Android 13; RMX3471 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/112.0.5615.29 Mobile Safari/537.36
Chrome Mobile 112
Android
Mobile
one year ago
Test name Executions per second
.forEach 2.1 Ops/sec
for..of 3.2 Ops/sec
for..of (destructuring) 2.6 Ops/sec
.map 2.0 Ops/sec
.map (destructuring) 2.2 Ops/sec
.for (init array) 2.6 Ops/sec
.reduce 2.9 Ops/sec
.reduce (destructuring) 2.6 Ops/sec
for..of (reduce) 2.7 Ops/sec
for..of (reduce) (destructuring) 3.1 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)


;