Tests:
  • Using the spread operator

    AخA
     
    const firstObject = { sampleData: 'Hello world' }
    const secondObject = { moreData: 'foo bar' }
    const finalObject = { ...firstObject, ...secondObject }
  • Using Raw

     
    const firstObject = { sampleData: 'Hello world' }
    const secondObject = { moreData: 'foo bar' }
    const finalObject = { sampleData: firstObject.sampleData, moreData: secondObject.moreData }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Using the spread operator
    Using Raw

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Chrome 67 on Windows 7
View result in a separate tab
Test name Executions per second
Using the spread operator 1996157.9 Ops/sec
Using Raw 625954880.0 Ops/sec