Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36
Chrome 88
Mac OS X 10.14.6
Desktop
3 years ago
Test name Executions per second
Lodash clone 1455854.6 Ops/sec
Lodash cloneDeep 235353.6 Ops/sec
Lodash merge 152218.7 Ops/sec
ES6 spread 12511837.0 Ops/sec
ES6 Object.assign 3347178.2 Ops/sec
JSON.parse(JSON.stringify()) 272393.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())


;