Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Linux
Desktop
11 months ago
Test name Executions per second
spread ... 6938550.5 Ops/sec
slice() 12203876.0 Ops/sec
splice(0) 6116394.0 Ops/sec
concat() 10681116.0 Ops/sec
JSON.parse(JSON.stringify()) 716682.7 Ops/sec
Custom function 1193387.1 Ops/sec
Lodash.cloneDeep() 643919.4 Ops/sec
jQuery.extend(true) 477863.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;