Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108
Windows
Desktop
one year ago
Test name Executions per second
spread ... 4072930.8 Ops/sec
slice() 10579157.0 Ops/sec
splice(0) 5686680.0 Ops/sec
concat() 6231773.5 Ops/sec
JSON.parse(JSON.stringify()) 671103.8 Ops/sec
Custom function 884858.1 Ops/sec
Lodash.cloneDeep() 547269.4 Ops/sec
jQuery.extend(true) 380114.3 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;