Run details:
Mozilla/5.0 (Linux; Android 12; M2101K6G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
Chrome Mobile 108
Android
Mobile
one year ago
Test name Executions per second
spread ... 10951027.0 Ops/sec
slice() 543414.7 Ops/sec
splice(0) 351779.0 Ops/sec
concat() 1555619.8 Ops/sec
JSON.parse(JSON.stringify()) 348221.8 Ops/sec
Custom function 350425.5 Ops/sec
Lodash.cloneDeep() 341000.6 Ops/sec
jQuery.extend(true) 284744.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;