HTML Preparation code:
Script Preparation code:
Tests:
  • _.cloneDeep(obj)

  • JSON.parse(JSON.stringify(obj))

  • structuredClone(obj)

  • _.cloneDeep(num)

  • JSON.parse(JSON.stringify(num))

  • structuredClone(num)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    _.cloneDeep(obj)
    JSON.parse(JSON.stringify(obj))
    structuredClone(obj)
    _.cloneDeep(num)
    JSON.parse(JSON.stringify(num))
    structuredClone(num)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 10 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36
Chrome Mobile 121 on Android
View result in a separate tab
Test name Executions per second
_.cloneDeep(obj) 36246.2 Ops/sec
JSON.parse(JSON.stringify(obj)) 41950.3 Ops/sec
structuredClone(obj) 42641.9 Ops/sec
_.cloneDeep(num) 879510.9 Ops/sec
JSON.parse(JSON.stringify(num)) 413144.2 Ops/sec
structuredClone(num) 141847.8 Ops/sec