Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Linux
Desktop
yesterday
Test name Executions per second
spread ... 17214134.0 Ops/sec
slice() 29972364.0 Ops/sec
splice(0) 17705382.0 Ops/sec
concat() 24513834.0 Ops/sec
JSON.parse(JSON.stringify()) 1525348.4 Ops/sec
Custom function 2130632.5 Ops/sec
Lodash.cloneDeep() 1118083.6 Ops/sec
jQuery.extend(true) 1050529.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;