Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Windows
Desktop
2 years ago
Test name Executions per second
spread ... 11331834.0 Ops/sec
slice() 17067066.0 Ops/sec
splice(0) 8773119.0 Ops/sec
concat() 11143537.0 Ops/sec
JSON.parse(JSON.stringify()) 1130129.2 Ops/sec
Custom function 1044308.4 Ops/sec
Lodash.cloneDeep() 920743.8 Ops/sec
jQuery.extend(true) 580991.8 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;