Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Firefox 123
Linux
Desktop
8 months ago
Test name Executions per second
spread ... 15651642.0 Ops/sec
slice() 29047448.0 Ops/sec
splice(0) 14347337.0 Ops/sec
concat() 20325360.0 Ops/sec
JSON.parse(JSON.stringify()) 1231338.0 Ops/sec
Custom function 1945490.0 Ops/sec
Lodash.cloneDeep() 1076619.1 Ops/sec
jQuery.extend(true) 931964.9 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;