Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36
Chrome 101
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
parseTestObject(stringObject); 4713716.5 Ops/sec
parseTestObject(bigStringObject); 4725879.0 Ops/sec
JSON.parse(bigJsonObject); 1081994.0 Ops/sec
JSON.parse(jsonObject); 1432461.5 Ops/sec
parseTestObjectUseArray(bigStringObject); 2714189.5 Ops/sec
parseTestObjectUseArray(stringObject); 2674279.2 Ops/sec
stringObject to vars 2152055.0 Ops/sec
bigStringObject to vars 2148301.2 Ops/sec
Script Preparation code:
Tests:
  • parseTestObject(stringObject);

  • parseTestObject(bigStringObject);

  • JSON.parse(bigJsonObject);

  • JSON.parse(jsonObject);

  • parseTestObjectUseArray(bigStringObject);

  • parseTestObjectUseArray(stringObject);

  • stringObject to vars

  • bigStringObject to vars