Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Chrome 99
Linux
Desktop
2 years ago
Test name Executions per second
spread ... 12963042.0 Ops/sec
slice() 16441880.0 Ops/sec
splice(0) 10019560.0 Ops/sec
concat() 15232658.0 Ops/sec
JSON.parse(JSON.stringify()) 742723.7 Ops/sec
Custom function 544654.9 Ops/sec
Lodash.cloneDeep() 445808.8 Ops/sec
jQuery.extend(true) 310014.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;