Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 OPR/97.0.0.0
Opera 97
Windows
Desktop
one year ago
Test name Executions per second
spread ... 22534852.0 Ops/sec
slice() 27879308.0 Ops/sec
splice(0) 17707436.0 Ops/sec
concat() 23389842.0 Ops/sec
JSON.parse(JSON.stringify()) 659808.2 Ops/sec
Custom function 514215.3 Ops/sec
Lodash.cloneDeep() 569013.9 Ops/sec
jQuery.extend(true) 312467.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;