Boost logo

Boost Users :

From: Sebastian.Karlsson_at_[hidden]
Date: 2008-08-04 10:20:16


>> 1) In the overview section performance is nowhere to be seen as a
>> goal, which for my use case is very important. If I were to use the
>> binary archive, how well would it perform in comparsion to a hand
>> crafted optimized serialization aproach? I've seen in the examples
>> that strings seems to be used to identify data, won't this create a
>> large overhead for both deserilzation and storage?
>
> Performance is a secondary goal that I have worked on, especially the
> serialization of large dense arrays. This is now as fast ad any hand
> crafted approach. What data structures are you interested in?
>
> Matthias

I'm reading a xml file into a custom tree data structure, parsing the
string representations into their correct types stored as boost::any.
I'm hoping that deserialization using boost::serialize will be
considerably faster than using libxml2 which I use to parse the xml
file. The node data in this structure pretty much looks like:

vector< DataCollection > children; // Naturally all the children of this node
std::string name; // This is the tag name in xml
boost::any value; // This is <b>value</b> in xml
std::map< std::string, boost::any > attributes; // Not entirely
suprising the attributes of the xml node

The values stored in boost::any will be fairly lightweight, so I would
recon that the majority of data read will actually be std::string for
keys into the attributes as well as the name of the node. So I guess
I'm having a little bit of everything hehe.

Since I won't send this data over network, and if I make a build for
another system I can just ship different data files, I'm more
interested in speed and the flexibility which boost::serilization
offers. I'd be very interested in your changes Matthias.


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