Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Mac OS X 10.15.7
Desktop
10 months ago
Test name Executions per second
spread ... 27087242.0 Ops/sec
slice() 29695878.0 Ops/sec
splice(0) 19839966.0 Ops/sec
concat() 25101320.0 Ops/sec
JSON.parse(JSON.stringify()) 1410625.1 Ops/sec
Custom function 1005344.9 Ops/sec
Lodash.cloneDeep() 873612.5 Ops/sec
jQuery.extend(true) 834175.9 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;