Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-11-20 19:01:42

bwood <brass_at_[hidden]> writes:

> Matthias Troyer wrote:
>>> i) somehow I doubt that this archive type has been tested with all
>>> the serialization test suite. Instructions for doing so are in the
>>> documenation and the serialization/test directory includes batch
>>> files for doing this with one's own archives. Was this done? What
>>> where the results? With which compiler? It costs nothing to do
>>> this.
>>Just ask if you had a doubt. The short answer is "I have done this".
>>After adding the fast array serialization to the binary and
>>polymorphic archives, I ran all your regression tests, without any
>>problem (using gcc 4 under MacOS X).
> Have you done this with vector also? I would be surprised
> if you have.

He has.

> It seems to me there is a standards issue to
> be addressed in this area. It is no problem to send the
> data in a vector of int as a unit, but I don't know of a
> way to add/receive the data into a vector correctly. It is
> possible to stuff the data into the correct place, but the
> vector's internal state/size does not get set properly since
> you didn't call push_back or some other method to get the
> data into place. Adding something like push_n_back to vector
> might help when it comes this.

You resize first and then copy the data in. It's a factor of 2 slower
than the ideal, but it's still way faster than doing what the library
does today.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at