HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • structuredClone

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    spread ...
    slice()
    splice(0)
    concat()
    JSON.parse(JSON.stringify())
    Custom function
    Lodash.cloneDeep()
    structuredClone

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 days ago)
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 on Android
View result in a separate tab
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


;