Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Windows
Desktop
2 years ago
Test name Executions per second
spread ... 16794026.0 Ops/sec
slice() 23889582.0 Ops/sec
splice(0) 13189650.0 Ops/sec
concat() 15830839.0 Ops/sec
JSON.parse(JSON.stringify()) 1439343.4 Ops/sec
Custom function 1376565.8 Ops/sec
Lodash.cloneDeep() 1301620.0 Ops/sec
jQuery.extend(true) 737447.5 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)