Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Chrome 66
Windows 7
Desktop
6 years ago
Test name Executions per second
parseTestObject(stringObject); 1676935.5 Ops/sec
parseTestObject(bigStringObject); 1718498.8 Ops/sec
JSON.parse(bigJsonObject); 397426.9 Ops/sec
JSON.parse(jsonObject); 587677.4 Ops/sec
parseTestObjectUseArray(bigStringObject); 1232634.8 Ops/sec
parseTestObjectUseArray(stringObject); 1175100.4 Ops/sec
stringObject to vars 900296.1 Ops/sec
bigStringObject to vars 913710.5 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