Run details:
Mozilla/5.0 (Linux; arm_64; Android 12; MNA-LX9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.109 YaBrowser/23.11.1.109.00 SA/3 Mobile Safari/537.36
Yandex Browser 23
Android
Mobile
one year ago
Test name Executions per second
.forEach 6.2 Ops/sec
for..of 11.0 Ops/sec
for..of (destructuring) 7.9 Ops/sec
.map 6.3 Ops/sec
.map (destructuring) 6.9 Ops/sec
.for (init array) 9.5 Ops/sec
.reduce 10.9 Ops/sec
.reduce (destructuring) 10.0 Ops/sec
for..of (reduce) 7.3 Ops/sec
for..of (reduce) (destructuring) 3.5 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)