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

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    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

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Firefox 104 on Windows
View result in a separate tab
Test name Executions per second
forEach #1 10276250.0 Ops/sec
fromEntries and map #1 7442709.0 Ops/sec
Object.assign and map #1 3632343.0 Ops/sec
reduce #1 3104652.0 Ops/sec
for 16240030.0 Ops/sec
forEach #2 10327520.0 Ops/sec
fromEntries and map #2 7483972.0 Ops/sec
Object.assign and map #2 3609576.0 Ops/sec
reduce #2 2944705.0 Ops/sec