Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Windows
Desktop
7 months ago
Test name Executions per second
spread ... 39753272.0 Ops/sec
slice() 50282464.0 Ops/sec
splice(0) 34782972.0 Ops/sec
concat() 40212068.0 Ops/sec
JSON.parse(JSON.stringify()) 1892683.4 Ops/sec
Custom function 1419087.6 Ops/sec
Lodash.cloneDeep() 1288988.5 Ops/sec
jQuery.extend(true) 1033618.6 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;