Script Preparation code:
AخA
 
var obj = {a: "hello", c: "test", po: 33, arr: [1, 2, 3, 4], anotherObj: {a: 33, str: "whazzup"}};
Tests:
  • JSON.parse

     
    var obj2 = JSON.parse(JSON.stringify(obj));
  • Object.assign

     
    var obj2 = Object.assign({}, obj);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    JSON.parse
    Object.assign

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 YaBrowser/25.2.0.0 Safari/537.36
Yandex Browser 25 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
JSON.parse 1636278.8 Ops/sec
Object.assign 17683352.0 Ops/sec