Script Preparation code:
AخA
 
const obj = { one: 'one' }
Tests:
  • Object.assign

     
    const res = Object.assign({}, { toString: function() { return this.one; }});
  • Destructuring

     
    const res = {...obj, toString: function() { return this.one; }};
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object.assign
    Destructuring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0
Firefox 136 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Object.assign 19201438.0 Ops/sec
Destructuring 18080626.0 Ops/sec