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) 2084851.5 Ops/sec
Object.Assign (in-place modify) 2569736.8 Ops/sec
lodash merge (deep copy) 1226682.6 Ops/sec
ES6 spread (new object) 1386030.9 Ops/sec
HTML Preparation code:
Tests:
  • lodash assign (shallow copy)

  • Object.Assign (in-place modify)

  • lodash merge (deep copy)

  • ES6 spread (new object)