Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
lodash assign (shallow copy) 5487784.0 Ops/sec
Object.Assign (in-place modify) 9124086.0 Ops/sec
lodash merge (deep copy) 4183855.2 Ops/sec
ES6 spread (new object) 3169130.8 Ops/sec
HTML Preparation code:
Tests:
  • lodash assign (shallow copy)

  • Object.Assign (in-place modify)

  • lodash merge (deep copy)

  • ES6 spread (new object)