Run details:
Mozilla/5.0 (Linux; Android 14; SM-A528B Build/UP1A.231005.007) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.106 Mobile Safari/537.36 OPT/2.9
Chrome Mobile 130
Android
Mobile
10 days ago
Test name Executions per second
spread ... 14543539.0 Ops/sec
slice() 17444542.0 Ops/sec
splice(0) 12902719.0 Ops/sec
concat() 16137571.0 Ops/sec
JSON.parse(JSON.stringify()) 849936.8 Ops/sec
Custom function 610601.4 Ops/sec
Lodash.cloneDeep() 413529.9 Ops/sec
structuredClone 174995.6 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • structuredClone


;