HTML Preparation code:
Tests:
  • Spread operator (...)

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)

  • structuredClone()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Spread operator (...)
    JSON.parse(JSON.stringify())
    Custom function
    Lodash.cloneDeep()
    jQuery.extend(true)
    structuredClone()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125 on Linux
View result in a separate tab
Test name Executions per second
Spread operator (...) 2725087.2 Ops/sec
JSON.parse(JSON.stringify()) 246551.0 Ops/sec
Custom function 474015.2 Ops/sec
Lodash.cloneDeep() 253799.1 Ops/sec
jQuery.extend(true) 340249.9 Ops/sec
structuredClone() 212233.8 Ops/sec