Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
8 months ago
Test name Executions per second
spread ... 45117420.0 Ops/sec
slice() 44285624.0 Ops/sec
splice(0) 39635172.0 Ops/sec
concat() 43280832.0 Ops/sec
JSON.parse(JSON.stringify()) 1243299.1 Ops/sec
Custom function 1200994.9 Ops/sec
Lodash.cloneDeep() 1655098.2 Ops/sec
jQuery.extend(true) 991219.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;