Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Firefox 102
Linux
Desktop
one year ago
Test name Executions per second
spread ... 7973473.0 Ops/sec
slice() 15004860.0 Ops/sec
splice(0) 5687841.0 Ops/sec
concat() 8687467.0 Ops/sec
JSON.parse(JSON.stringify()) 759147.6 Ops/sec
Custom function 726522.1 Ops/sec
Lodash.cloneDeep() 607854.6 Ops/sec
jQuery.extend(true) 447952.9 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;