Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
Chrome 130
Windows
Desktop
16 days ago
Test name Executions per second
spread ... 26780944.0 Ops/sec
slice() 33224770.0 Ops/sec
splice(0) 24016260.0 Ops/sec
concat() 31314188.0 Ops/sec
JSON.parse(JSON.stringify()) 1593691.0 Ops/sec
Custom function 1233833.6 Ops/sec
Lodash.cloneDeep() 876436.9 Ops/sec
jQuery.extend(true) 943457.4 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;