Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Windows
Desktop
10 months ago
Test name Executions per second
spread ... 21685572.0 Ops/sec
slice() 33699204.0 Ops/sec
splice(0) 20827238.0 Ops/sec
concat() 32415030.0 Ops/sec
JSON.parse(JSON.stringify()) 2104973.8 Ops/sec
Custom function 2913229.0 Ops/sec
Lodash.cloneDeep() 1646638.0 Ops/sec
jQuery.extend(true) 1138110.5 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;