Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Windows
Desktop
7 days ago
Test name Executions per second
spread ... 14025848.0 Ops/sec
slice() 20152008.0 Ops/sec
splice(0) 14007956.0 Ops/sec
concat() 17367470.0 Ops/sec
JSON.parse(JSON.stringify()) 1597177.0 Ops/sec
Custom function 2057723.4 Ops/sec
Lodash.cloneDeep() 1291228.8 Ops/sec
jQuery.extend(true) 1086475.9 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;