Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36
Chrome 74
Windows 7
Desktop
5 years ago
Test name Executions per second
parseTestObject(stringObject); 3165573.8 Ops/sec
parseTestObject(bigStringObject); 3357524.2 Ops/sec
JSON.parse(bigJsonObject); 568596.2 Ops/sec
JSON.parse(jsonObject); 928193.8 Ops/sec
parseTestObjectUseArray(bigStringObject); 2136985.8 Ops/sec
parseTestObjectUseArray(stringObject); 1997845.8 Ops/sec
stringObject to vars 1610684.4 Ops/sec
bigStringObject to vars 1606031.4 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