Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0
Chrome 125
Windows
Desktop
6 months ago
Test name Executions per second
spread ... 39808432.0 Ops/sec
slice() 43678164.0 Ops/sec
splice(0) 32357932.0 Ops/sec
concat() 39344984.0 Ops/sec
JSON.parse(JSON.stringify()) 1824922.2 Ops/sec
Custom function 1294628.6 Ops/sec
Lodash.cloneDeep() 1173724.8 Ops/sec
jQuery.extend(true) 1104065.6 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;