Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
10 months ago
Test name Executions per second
spread ... 11641320.0 Ops/sec
slice() 13227371.0 Ops/sec
splice(0) 10761778.0 Ops/sec
concat() 12450064.0 Ops/sec
JSON.parse(JSON.stringify()) 692761.9 Ops/sec
Custom function 675741.1 Ops/sec
Lodash.cloneDeep() 542758.6 Ops/sec
jQuery.extend(true) 472478.5 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;