Script Preparation code:
Tests:
  • Reduce / Spread

  • Map Object.entries / Object.fromEntries

  • Object.assign - single spread, no mutation

  • Object.assign - single spread, mutate first

  • Simple fromEntries

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Reduce / Spread
    Map Object.entries / Object.fromEntries
    Object.assign - single spread, no mutation
    Object.assign - single spread, mutate first
    Simple fromEntries

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Chrome 93 on Mac OS X 10.13.6
View result in a separate tab
Test name Executions per second
Reduce / Spread 343.1 Ops/sec
Map Object.entries / Object.fromEntries 4919.0 Ops/sec
Object.assign - single spread, no mutation 15033.9 Ops/sec
Object.assign - single spread, mutate first 24551.4 Ops/sec
Simple fromEntries 13556.4 Ops/sec


;