[xsd-users] Binary serialization performance in version 4.0.0 vs
3.3.0
Boris Kolpackov
boris at codesynthesis.com
Wed Oct 22 01:35:33 EDT 2014
Hi Svetlana,
svetlana.samsonik at thomsonreuters.com <svetlana.samsonik at thomsonreuters.com> writes:
> I ran the tests in the 'performance' example and received very similar
> results.
>
> I my own test are slightly different. I changed the example code to
> mimic the my logic and I received similar results to yours for parsing
> and serialization.
So, just to confirm, you have changes the 'performance' test to mimic
your logic but still used the "dummy" schema that comes with the test?
And the result was that the numbers for 3.3.0 and 4.0.0 were very close,
correct?
> When I run the those tests for "real" schema (which is complicated)
> and file size 25K, I receive the following results
I am not sure what you mean by "those tests". The output that you
showed doesn't look like the 'performance' test. And it doesn't have
the binary serialization part. Did you add this to the 'performance'.
> My biggest concern is "Copy from XDR to C++/Tree object" where it is
> 4 times longer to compare with "Serialize C++/Tree object to XRD" in
> version 4.0, where it is only 2 times in version 3.3.0.
>
> I ran valgrind --tool=callgrind for both test and you can see that
> the same function (loadFromXDR) has much more "Ir per call" for
> version 4.0 (first picture) vs version 3.3 ( second picture).
This is interesting. Could you do two things for me:
1. Build your 4.0.0 test in the c++98 rather than c++11 mode and see
if there are any differences.
2. Send the power::newMessage(XDR) constructor body for both 3.3.0
and 4.0.0. I have looked at a few such constructors from the
examples and they look almost identical. There are a few extra
inline function calls in 4.0.0 but they definitely cannot explain
this difference (unless you built with optimization disabled).
Boris
More information about the xsd-users
mailing list