Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Linux
Desktop
2 years ago
Test name Executions per second
spread ... 21549202.0 Ops/sec
slice() 26817352.0 Ops/sec
splice(0) 17692876.0 Ops/sec
concat() 23292706.0 Ops/sec
JSON.parse(JSON.stringify()) 823481.9 Ops/sec
Custom function 707833.0 Ops/sec
Lodash.cloneDeep() 539933.4 Ops/sec
jQuery.extend(true) 396010.3 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;