Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Firefox 72
Linux
Desktop
4 years ago
Test name Executions per second
forEach #1 1542798.8 Ops/sec
fromEntries and map #1 1172926.2 Ops/sec
Object.assign and map #1 487486.4 Ops/sec
reduce #1 532805.4 Ops/sec
for 2005929.4 Ops/sec
forEach #2 1579787.9 Ops/sec
fromEntries and map #2 1125266.5 Ops/sec
Object.assign and map #2 469806.8 Ops/sec
reduce #2 543642.8 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


;