Run details:
Mozilla/5.0 (Linux; Android 10; Mi A3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.96 Mobile Safari/537.36
Chrome Mobile 83
Android
Mobile
4 years ago
Test name Executions per second
forEach #1 312186.7 Ops/sec
fromEntries and map #1 222137.7 Ops/sec
Object.assign and map #1 198665.1 Ops/sec
reduce #1 234827.6 Ops/sec
for 156565.5 Ops/sec
forEach #2 315988.1 Ops/sec
fromEntries and map #2 226277.5 Ops/sec
Object.assign and map #2 199759.6 Ops/sec
reduce #2 242434.3 Ops/sec
Script Preparation code:
Tests:
  • forEach #1

  • fromEntries and map #1

  • Object.assign and map #1

  • reduce #1

  • for

  • forEach #2

  • fromEntries and map #2

  • Object.assign and map #2

  • reduce #2


;