[Development] Json support for QtCore

lars.knoll at nokia.com lars.knoll at nokia.com
Mon Dec 12 13:13:30 CET 2011


On 12/12/11 1:16 AM, "ext Thiago Macieira" <thiago.macieira at intel.com>
wrote:

>On Sunday, 11 de December de 2011 14.47.21, lars.knoll at nokia.com wrote:
>> I now redid the benchmarks comparing qjson (as provided by my Ubuntu
>> install, linked against Qt 4.7), qjsonparser (latest HEAD, linked
>>against
>> Qt 5) and my qtbinaryjson (linked against Qt5 as well). Here are the
>> numbers:
>
>Can you run with -tickcounter -iterations 1024 ?

Sure. Here you go:

qjson:

********* Start testing of tst_Json *********
Config: Using QTest library 4.7.2, Qt 4.7.2
PASS   : tst_Json::initTestCase()
RESULT : tst_Json::testByteArray():
     40,715,021.989 CPU ticks per iteration (total: 41,692,182,517,
iterations: 1024)
PASS   : tst_Json::testByteArray()
RESULT : tst_Json::testNumbers():
     559,103.889 CPU ticks per iteration (total: 572,522,383, iterations:
1024)
PASS   : tst_Json::testNumbers()
PASS   : tst_Json::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_Json *********

qjsonparser:


********* Start testing of tst_Json *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : tst_Json::initTestCase()
RESULT : tst_Json::testByteArray():
     3,586,346.742 CPU ticks per iteration (total: 3,672,419,064,
iterations: 1024)
PASS   : tst_Json::testByteArray()
RESULT : tst_Json::testString():
     3,356,375.772 CPU ticks per iteration (total: 3,436,928,791,
iterations: 1024)
PASS   : tst_Json::testString()
RESULT : tst_Json::testNumbers():
     39,957.531 CPU ticks per iteration (total: 40,916,512, iterations:
1024)
PASS   : tst_Json::testNumbers()
PASS   : tst_Json::cleanupTestCase()
Totals: 5 passed, 0 failed, 0 skipped

qtbinaryjson:


********* Start testing of BenchmarkQtBinaryJson *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : BenchmarkQtBinaryJson::initTestCase()
RESULT : BenchmarkQtBinaryJson::parseNumbers():
     14,881.212 CPU ticks per iteration (total: 15,238,362, iterations:
1024)
PASS   : BenchmarkQtBinaryJson::parseNumbers()
RESULT : BenchmarkQtBinaryJson::parseJson():
     853,513.916 CPU ticks per iteration (total: 873,998,250, iterations:
1024)
PASS   : BenchmarkQtBinaryJson::parseJson()
RESULT : BenchmarkQtBinaryJson::parseJsonToVariant():
     2,495,013.374 CPU ticks per iteration (total: 2,554,893,695,
iterations: 1024)
PASS   : BenchmarkQtBinaryJson::parseJsonToVariant()
PASS   : BenchmarkQtBinaryJson::cleanupTestCase()
Totals: 5 passed, 0 failed, 0 skipped
********* Finished testing of BenchmarkQtBinaryJson *********

Cheers,

Lars





More information about the Development mailing list