HTML Preparation code:
AخA
 
1
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
Script Preparation code:
 
var obj = {
    a: 1,
    b: { c: 2 },
    d: [4, 5, 6],
    e: { f: [1, 2], g: { h: 1 } }
};
Tests:
  • json

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

     
    $.extend(true, {}, obj);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    json
    jquery

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
Edge 17.17134 on Windows
View result in a separate tab
Test name Executions per second
json 180178.6 Ops/sec
jquery 84045.8 Ops/sec