Run details:
Mozilla/5.0 (Linux; Android 11; SM-A705FN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36
Chrome Mobile 93
Android
Mobile
3 years ago
Test name Executions per second
Lodash clone 438514.8 Ops/sec
Lodash cloneDeep 90797.6 Ops/sec
Lodash merge 47630.3 Ops/sec
ES6 spread 3174949.8 Ops/sec
ES6 Object.assign 960025.2 Ops/sec
JSON.parse(JSON.stringify()) 109342.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash clone

  • Lodash cloneDeep

  • Lodash merge

  • ES6 spread

  • ES6 Object.assign

  • JSON.parse(JSON.stringify())