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

Boris Kolpackov boris at codesynthesis.com
Mon Oct 27 09:28:24 EDT 2014


Hi Svetlana,

svetlana.samsonik at thomsonreuters.com <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            4667              5420              5648
> 
> Serialize XML:     4998            5082              5735              6038
> 
> Serialize XRD:     325             356               329               332
> 
> Pasre XDR:         725             765               1405              1444

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