Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
spread ... 20124288.0 Ops/sec
slice() 25456520.0 Ops/sec
splice(0) 17873432.0 Ops/sec
concat() 28737742.0 Ops/sec
JSON.parse(JSON.stringify()) 2199388.8 Ops/sec
Custom function 3631825.0 Ops/sec
Lodash.cloneDeep() 1768094.9 Ops/sec
jQuery.extend(true) 1221369.0 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;