Re: Serialization performance comparison with Boost.serialization

2009-04-01 Thread Yingfeng Zhang
I think Boost has made some optimization for such data as vectorint, it performs almost the same as memcpy directly. However, if we serialize a bit more complicated data structure, such as vectorpairint, int , or vectorMyData, where MyData refers to struct { int a; int b; int c; int d; } Then it

Re: Serialization performance comparison with Boost.serialization

2009-03-30 Thread Kenton Varda
Several points: * Some of your test cases seem to be parsing from or serializing to files. This may be measuring file I/O performance more than it is measuring the respective serialization libraries. Even though you are using clock() to measure time, simply setting up file I/O operations

Re: Serialization performance comparison with Boost.serialization

2009-03-30 Thread Kenton Varda
That's more like it. :) On Mon, Mar 30, 2009 at 7:09 PM, Yingfeng Zhang yingfeng.zh...@gmail.comwrote: Thanks for feedbacks. I agree with what your points.I use vectorstring because it had already been used on existing platform. A newer test of comparing vectorint has the following result:

Re: Serialization performance comparison with Boost.serialization

2009-03-30 Thread Yingfeng Zhang
If we change boost binary, here is the result, it seems much faster.. It takes 0.08 seconds for boost to serialize vectorint of size 1000 ! It takes 0.05 seconds for boost to deserialize vectorint of size 1000 ! Best On Tue, Mar 31, 2009 at 10:46 AM, Kenton Varda ken...@google.com

Re: Serialization performance comparison with Boost.serialization

2009-03-30 Thread Kenton Varda
What do you mean change boost binary? Parsing ~500MB in 0.05 seconds sounds dubious to me. That's 10GB/s throughput. On Mon, Mar 30, 2009 at 7:57 PM, Yingfeng Zhang yingfeng.zh...@gmail.comwrote: If we change boost binary, here is the result, it seems much faster.. It takes 0.08 seconds for

Re: Serialization performance comparison with Boost.serialization

2009-03-30 Thread Yingfeng Zhang
boost supports two kinds of serialization mechanism : text and binary On Tue, Mar 31, 2009 at 11:37 AM, Kenton Varda ken...@google.com wrote: What do you mean change boost binary? Parsing ~500MB in 0.05 seconds sounds dubious to me. That's 10GB/s throughput. On Mon, Mar 30, 2009 at

Re: Serialization performance comparison with Boost.serialization

2009-03-30 Thread Alek Storm
I think Yingfeng is referring to the archive formats described here: http://www.boost.org/doc/libs/1_38_0/libs/serialization/doc/archives.html#archive_models. The binary format, however, appears to be non-portable, so it doesn't seem to serve the same purpose as Protocol Buffers, and should be

Re: Serialization performance comparison with Boost.serialization

2009-03-29 Thread Kenton Varda
What does your .proto file look like? And the code that uses it? On Sun, Mar 29, 2009 at 9:06 PM, Yingfeng yingfeng.zh...@gmail.com wrote: Hi, We are looking for a fast mechanism for serialization/deserialization. Here is our comparison between pb and boost: We hope to

Serialization performance comparison with Boost.serialization

2009-03-29 Thread Yingfeng
Hi, We are looking for a fast mechanism for serialization/deserialization. Here is our comparison between pb and boost: We hope to serialize/deserialize data in std containers, such as: std::vectorstd::string Here is the data 1000 strings are stored in the vector as to boost: