Script Preparation code:
x
 
base = {
    asdsA: 'dasdsa',
    dsad: 434534,
    hji: 'asdsa',
};
second = {
    thing: 'hey'
};
createCopy = (base, other) => {
    return {
    asdsA: base.asdsA,
    dsad: base.dsad,
    hji: base.hji,
    thing: other.thing,
  };
};
Tests:
  • Simple Assign

     
    Object.assign({}, base)
  • Assign joining 2 objects

     
    Object.assign({}, base, second);
  • Manually joining 2 objects

     
    createCopy(base,  second);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Simple Assign
    Assign joining 2 objects
    Manually joining 2 objects

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
Chrome 86 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Simple Assign 2992828.0 Ops/sec
Assign joining 2 objects 2053949.2 Ops/sec
Manually joining 2 objects 2519832.2 Ops/sec