Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126
Mac OS X 10.15
Desktop
6 months ago
Test name Executions per second
spread ... 22228568.0 Ops/sec
slice() 38752652.0 Ops/sec
splice(0) 15948404.0 Ops/sec
concat() 27381928.0 Ops/sec
JSON.parse(JSON.stringify()) 2536768.2 Ops/sec
Custom function 4147328.5 Ops/sec
Lodash.cloneDeep() 1947059.8 Ops/sec
jQuery.extend(true) 1761464.1 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;