Script Preparation code:
x
 
var obj = {
  description: 'Creates a deep copy of source, which should be an object or an array.',
  myNumber: 123456789,
  myBoolean: true,
  jayson: {
    stringify: 'JSON.stringify() method converts a JavaScript value to a JSON string....',
    parse: 'JSON.parse() method parses a JSON string...'
  }
};
var jsonString = '{"description":"Creates a deep copy of source, which should be an object or an array.","myNumber":123456789,"myBoolean":true,"jayson":{"stringify":"JSON.stringify() method converts a JavaScript value to a JSON string....","parse":"JSON.parse() method parses a JSON string..."}}'
Tests:
  • JSON.parse

     
    JSON.parse(jsonString);
  • JSON.stringify

     
    JSON.stringify(obj)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    JSON.parse
    JSON.stringify

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Windows
View result in a separate tab
Test name Executions per second
JSON.parse 2305754.2 Ops/sec
JSON.stringify 2993675.2 Ops/sec