HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
window.dater = {
    name: 'test',
    arr: [1, 2, 3, 4, 5],
    innerObj: {
        name: 'Test Inner',
        innerArr: [2, 4, 5, 6],
        isDeleted: false,
    },
    sigh: true,
};
Tests:
  • JSON

     
    const res = JSON.parse(JSON.stringify(window.dater))
  • clone deep

     
    const result = _.cloneDeep(window.dater)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    JSON
    clone deep

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
JSON 1208402.1 Ops/sec
clone deep 793943.1 Ops/sec