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

  • Object.Assign (in-place modify)

  • lodash merge (deep copy)

  • ES6 spread (new object)