Run details:
Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Windows
Desktop
one year ago
Test name Executions per second
spread ... 8121278.5 Ops/sec
slice() 12657408.0 Ops/sec
splice(0) 7667772.0 Ops/sec
concat() 13418239.0 Ops/sec
JSON.parse(JSON.stringify()) 972418.2 Ops/sec
Custom function 1620862.8 Ops/sec
Lodash.cloneDeep() 920765.0 Ops/sec
jQuery.extend(true) 823788.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;