Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
2 months ago
Test name Executions per second
spread ... 31305836.0 Ops/sec
slice() 33857144.0 Ops/sec
splice(0) 25687064.0 Ops/sec
concat() 30587218.0 Ops/sec
JSON.parse(JSON.stringify()) 1590548.0 Ops/sec
Custom function 1070787.2 Ops/sec
Lodash.cloneDeep() 965387.6 Ops/sec
jQuery.extend(true) 908444.3 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;