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: 8 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Chrome 139 on Windows
View result in a separate tab
Test name Executions per second
Spread operator (...) 3676.4 Ops/sec
JSON.parse(JSON.stringify()) 20.4 Ops/sec
Custom function 45.1 Ops/sec
Lodash.cloneDeep() 3650.6 Ops/sec
jQuery.extend(true) 3829.9 Ops/sec
structuredClone() 1867.5 Ops/sec