views:

770

answers:

2

Hi, I'm building a distributed C++ application that needs to do lots of serialization and deserialization of data stored in std containers.

Currently Boost.serialization is adopted. However, it performs terrible. Our B-tree also use Boost.serialization to store key-value pair data, however, if we change Boost.serialziation to memcpy, the accessing speed will be improved 10 times or more. Since given the current distributed platform, so many data exchange are needed, therefore easy programming is also required together with high performance. I know protocol buffer could also be used as a serialization mechanism, however, I am not sure about the performance comparison between Boost.serialization and protocol buffer, another issue is , does there exist any better solutions to provider higher performance as close to memcpy?

Thanks

+1  A: 

Someone asked a very similar question: http://stackoverflow.com/questions/321619/c-serialization-performance

It looks like protocol buffers are a good way to go, though without knowing your applications' requirements, it is hard to recommend any particular library or technique.

Colin Curtin
+1  A: 

View graphic comparison here :
http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking

lsalamon
Thats for the Java implementations.
Bklyn