Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Chrome 98
Windows
Desktop
2 years ago
Test name Executions per second
Lodash clone 1610532.4 Ops/sec
Lodash cloneDeep 250286.9 Ops/sec
Lodash merge 146468.9 Ops/sec
ES6 spread 13911122.0 Ops/sec
ES6 Object.assign 4030211.5 Ops/sec
JSON.parse(JSON.stringify()) 264691.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash clone

  • Lodash cloneDeep

  • Lodash merge

  • ES6 spread

  • ES6 Object.assign

  • JSON.parse(JSON.stringify())