Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Runtime overhead of serialization archives
From: Georg Gast (georg_at_[hidden])
Date: 2016-09-22 00:25:01


Hello Bjorn,

I just wanted to make clear that I know that this c style thing uses memcpy. I would like to use the boost serialization to have its advantages compared to the c style thing. In fact I set up this test to see what runtime costs are there compared to c memcpy. I use boost serialization a lot, but to now not on a time critical path.

In my source I use for the streams boost iostream array_source/sink to serialization into/from a vector of chars (my packet typedef).

Could you please elaborate what is different in your archive?

Thanks!

Am 21. September 2016 23:31:09 MESZ, schrieb Bjorn Reese <breese_at_[hidden]>:
>On 09/21/2016 08:35 PM, Georg Gast wrote:
>> Am 21.09.2016 um 19:36 schrieb Bjorn Reese:
>
>>> The Boost archives use iostreams, whereas cstyle uses memcpy.
>>
>> Yes, thats clear. :)
>
>I am not sure how to interpret your response. My statement was not a
>casual observation about your tests, but the main explanation for the
>difference in performance.
>
>That is one of the reasons why my own archives, unlike the ones
>that are part of Boost.Serialization, are constructed to serialize
>directly to/from other container types such as arrays, std::string,
>and std::vector.
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net