Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Linux
Desktop
10 months ago
Test name Executions per second
spread ... 4584053.5 Ops/sec
slice() 7435498.5 Ops/sec
splice(0) 4179599.5 Ops/sec
concat() 6862318.5 Ops/sec
JSON.parse(JSON.stringify()) 551828.1 Ops/sec
Custom function 788444.6 Ops/sec
Lodash.cloneDeep() 456355.8 Ops/sec
jQuery.extend(true) 361402.1 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;