HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)

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()
    jQuery.extend(true)

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 10 hours ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
Firefox 124 on Ubuntu
View result in a separate tab
Test name Executions per second
spread ... 15058680.0 Ops/sec
slice() 29405720.0 Ops/sec
splice(0) 20286940.0 Ops/sec
concat() 27482880.0 Ops/sec
JSON.parse(JSON.stringify()) 1971605.0 Ops/sec
Custom function 3106034.0 Ops/sec
Lodash.cloneDeep() 1958767.0 Ops/sec
jQuery.extend(true) 1589735.0 Ops/sec