Script Preparation code:
AخA
 
var obj1 = { a: 1, b: 2 };
var obj2 = { b: 2, c: 3 };
Tests:
  • Spread

     
    const obj3 = { ...obj1, ...obj2 };
  • Object.assign

     
    const obj3 = Object.assign({}, obj1, obj2);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Spread
    Object.assign

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108 on Windows
View result in a separate tab
Test name Executions per second
Spread 1358886.6 Ops/sec
Object.assign 2025186.2 Ops/sec