Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Firefox 99
Ubuntu
Desktop
2 years ago
Test name Executions per second
spread ... 8124554.5 Ops/sec
slice() 15123659.0 Ops/sec
splice(0) 5063997.5 Ops/sec
concat() 7768140.0 Ops/sec
JSON.parse(JSON.stringify()) 645720.8 Ops/sec
Custom function 742608.1 Ops/sec
Lodash.cloneDeep() 481154.5 Ops/sec
jQuery.extend(true) 413236.1 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;