Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Linux
Desktop
2 months ago
Test name Executions per second
spread ... 46581496.0 Ops/sec
slice() 43484556.0 Ops/sec
splice(0) 40681116.0 Ops/sec
concat() 43442772.0 Ops/sec
JSON.parse(JSON.stringify()) 2709688.0 Ops/sec
Custom function 1929342.4 Ops/sec
Lodash.cloneDeep() 1569187.1 Ops/sec
jQuery.extend(true) 1435669.5 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;