Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2006-09-22 01:28:55


On 22.09.2006, at 00:18, Robert Ramey wrote:
>
> I also believe that things have been confused by an evolution
> in the original idea for save/load array. As I remember the
> motivation
> was that save/load array could be re-implemented differently for
> binary and/or mpi and/or other archives. Of course we have this
> now as the array_wrapper can be implemented differently for
> each archive. But now it seems that save/load array are going
> to be quite different for binary and mpi type archives. I think that
> at one point there might have been the idea that save/load
> implementations
> could be shared between different binary-type archives. But now
> it seems that binary_archive an mpi and/or other archives will have
> less in common than originally thought.

Our motivation was actually not that the save/load implementation
code could be shared, but the dispatch code to decide for which types
the optimized serialization can be used and for which it can't. That
code is 50x bigger than the actual save_array/load_array
implementations which are just ne or few-line dispatches to
save_binary, MPI_Pack, or the creation of an MPI data type.

> I think this evolution has led to code which is very hard for me to
> follow
> and which will be more work to maintain and support. I can't help
> but think that if 10x speed up of binary_archive were considered
> today,
> (given the wrapper and other changes), the enhancement would
> be less general and much simpler.

Sure, if you want to restrict the enhancements to binary archives and
primitive data types a slightly simpler implementation is possible.
That solution would not be scalable, however.

Matthias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk