[xsd-users] Binary serialization performance in version 4.0.0 vs 3.3.0

svetlana.samsonik at thomsonreuters.com svetlana.samsonik at thomsonreuters.com
Tue Oct 28 21:28:44 EDT 2014


Hi Boris,



You are absolutely right about optimized version.

I did not give you correct results and yes, there is no performance difference between c++98 and c++11

optimized.



I double checked non-optimized results and my numbers didn't change.





      --std c++98 -O0  --std c++98 -O2   --std c++11 -O0   --std c++11 -O2

Parse XML:         4715           3769         5420              3509



Serialize XML:     4998           3958         5735              3980



Serialize XRD:     325           98           329               92

Pasre XDR:         725            234          1405              230



Do you still want parse() function? My newsMessage object is deeply nested.



Thank you,

Svetlana



-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Monday, October 27, 2014 9:28 AM
To: Samsonik, Svetlana (TR Technology)
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Binary serialization performance in version 4.0.0 vs 3.3.0



Hi Svetlana,



svetlana.samsonik at thomsonreuters.com<mailto:svetlana.samsonik at thomsonreuters.com> <svetlana.samsonik at thomsonreuters.com<mailto:svetlana.samsonik at thomsonreuters.com>> writes:



>         --std c++98 -O0  --std c++98 -O2   --std c++11 -O0   --std c++11 -O2

>

> Parse XML:         4715/ 3769           4667              5420              5648/ 3509

>

> Serialize XML:     4998 /3958           5082              5735              6038/ 3980

>

> Serialize XRD:     325 / 98             356               329               332 / 92

>

> Pasre XDR:         725 / 234            765               1405              1444/ 230



Wow, these numbers are hard to believe. Especially the Parse XDR part. What they tell me are two things:



1. C++11 code is twice as slow as C++98.



2. Code built with optimization disabled (-O0) is faster than with

   optimization enabled (-O2).



#2 is especially hard to believe. Can you maybe double check that the test setup is correct?





> Both constructors are identical for 3.3.0 and 4.0.0:

>

>

>   namespace power

>   {

>   newsMessage::

>   newsMessage (::xml_schema::istream< XDR >& s,

>                ::xml_schema::flags f,

>                ::xml_schema::container* c)

>   : ::xml_schema::type (s, f, c),

>     header_ (this),

>     itemSet_ (this)

>   {

>     this->parse (s, f);

>   }



Can you also send the parse() function bodies as well (the ones that take the XDR stream)?



Boris


More information about the xsd-users mailing list