Run details:
Mozilla/5.0 (Android 11; Mobile; rv:109.0) Gecko/118.0 Firefox/118.0
Firefox Mobile 118
Android
Mobile
one year ago
Test name Executions per second
spread ... 3092119.5 Ops/sec
slice() 6309593.5 Ops/sec
splice(0) 2976019.8 Ops/sec
concat() 4352912.5 Ops/sec
JSON.parse(JSON.stringify()) 328308.6 Ops/sec
Custom function 448352.6 Ops/sec
Lodash.cloneDeep() 258257.5 Ops/sec
jQuery.extend(true) 198717.1 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)