Run details:
Mozilla/5.0 (Android 10; Mobile; rv:108.0) Gecko/108.0 Firefox/108.0
Firefox Mobile 108
Android
Mobile
one year ago
Test name Executions per second
spread ... 3628575.2 Ops/sec
slice() 11734497.0 Ops/sec
splice(0) 6111519.0 Ops/sec
concat() 6842168.5 Ops/sec
JSON.parse(JSON.stringify()) 427908.7 Ops/sec
Custom function 594269.9 Ops/sec
Lodash.cloneDeep() 391724.7 Ops/sec
jQuery.extend(true) 237079.8 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;