Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36
Chrome Mobile 122
Android
Mobile
10 months ago
Test name Executions per second
spread ... 5167902.5 Ops/sec
slice() 6824855.0 Ops/sec
splice(0) 4812178.5 Ops/sec
concat() 6596615.0 Ops/sec
JSON.parse(JSON.stringify()) 303866.3 Ops/sec
Custom function 259013.1 Ops/sec
Lodash.cloneDeep() 230358.1 Ops/sec
jQuery.extend(true) 202316.2 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)