Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
Chrome 121
Windows
Desktop
9 months ago
Test name Executions per second
spread ... 29204222.0 Ops/sec
slice() 32783562.0 Ops/sec
splice(0) 24079732.0 Ops/sec
concat() 22278878.0 Ops/sec
JSON.parse(JSON.stringify()) 1413374.0 Ops/sec
Custom function 1208187.5 Ops/sec
Lodash.cloneDeep() 990575.6 Ops/sec
jQuery.extend(true) 999512.1 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)