Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0
Firefox 111
Windows
Desktop
one year ago
Test name Executions per second
spread ... 9561469.0 Ops/sec
slice() 13877993.0 Ops/sec
splice(0) 8625179.0 Ops/sec
concat() 9800309.0 Ops/sec
JSON.parse(JSON.stringify()) 892337.4 Ops/sec
Custom function 1382725.9 Ops/sec
Lodash.cloneDeep() 835984.3 Ops/sec
jQuery.extend(true) 651431.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;