Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Windows
Desktop
4 years ago
Test name Executions per second
forEach #1 1620339.8 Ops/sec
fromEntries and map #1 1108603.5 Ops/sec
Object.assign and map #1 414721.8 Ops/sec
reduce #1 431604.7 Ops/sec
for 2125625.5 Ops/sec
forEach #2 1531514.5 Ops/sec
fromEntries and map #2 983339.5 Ops/sec
Object.assign and map #2 451489.5 Ops/sec
reduce #2 412630.1 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


;