Boost logo

Boost Users :

Subject: Re: [Boost-users] New and updated serialization performance results
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-03-03 00:48:17


Given your interest in this topic, you might want to take a look at

boost/libs/serialization/performance.

included with the boost 1.38 package.

There is a Jamfile.v2 in that directory and everything is set
up just the way boost testing is. The only difference is
that, using the GCC compiler, a function by function
time table is generated which pinpoints where time
is being consumed. This would help answer such questions
as "what if I replaced std::string with something else".

 I only included a couple of performance tests to
demonstrate the system. I havn't had time to make
a more complete set of tests. Ideally, I would like
to see your tests included for comparison.

My question has always been that since serialization
(in at least the simpler cases) just boils down
to writing out the data, whether the code is
generated by one template or another shouldn't
make a big difference. That is, at the end of the
day, the sequence of operations should be pretty
much the same whether one is hand rolling the code
or whether it is generated by templates.

Filling out this performance test suite might help
answer this question.

Robert Ramey

Brian Wood wrote:
> Recently I updated this comparsion,
> http://webEbenezer.net/comparison.html, of Ebenezer
> Enterprises and the Boost Serialization library.
> Here's a link to the previous version of that file,
> http://webEbenezer.net/compprev.html. The previous
> tests used Boost 1.34.1 and the updated versions use
> Boost 1.38. I didn't detect any improvement performance-
> wise in the Boost Serialization library in this round of
> testing. In addition to the updated results, I've added
> some new tests that test loading/receiving data.
> Although Boost Serialization comes closer to Ebenezer
> times when loading/receiving data than it does when
> saving/sending data, there still is a gap between the
> two. That gap is greatest when (multi)set, (multi)map,
> or rb_tree are used. This is probably because Boost
> Serialization doesn't use the insert with a hint
> function available with these containers. I believe
> that multi_index uses the hinted verison of insert
> in it's marshalling code, so in my opinion it makes
> sense to consider this in Boost Serialization also.
>
> Additionally, we've added support for flex_string,
> http://erdani.org/code/main.html, to the site. On that page
> it says Harmut Kaizer reported that dropping flex_string
> into the Wave Boost Preprocessor improved it's speed by
> 5-10%, depending on input. I've done a few performance
> tests comparing the two strings and also found
> flex_string to be more efficient than std::string.
>
> Brian Wood
> Ebenezer Enterprises
> www.webEbenezer.net
>
> "Then Samuel took a rock and set it up between Mizpah
> and Shen. He named it Ebenezer [Rock of Help] and said,
> 'Until now the LORD has helped us.'"


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