Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0
Firefox 122
Mac OS X 10.15
Desktop
9 months ago
Test name Executions per second
spread ... 21423364.0 Ops/sec
slice() 25179810.0 Ops/sec
splice(0) 14124309.0 Ops/sec
concat() 24868532.0 Ops/sec
JSON.parse(JSON.stringify()) 2059216.6 Ops/sec
Custom function 3365867.8 Ops/sec
Lodash.cloneDeep() 1750868.4 Ops/sec
jQuery.extend(true) 1314596.6 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;