|
Boost Users : |
Subject: Re: [Boost-users] Serialization / Fast [non-portable] serialization forbinary data
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-05-14 02:20:05
Enhancements done by Mathias Troyer added this functionality to the library.
It's implemented for all standard library collections. It's described in
the documentation. Also described is how to exploit this facility to make
other collections exploit "fast serialization".
Robert Ramey
Dan Eaton wrote:
> Hi,
>
> One more question for the list:
>
> I have my own 1, 2 and 3 dimensional array classes, and would like to
> serialize large such objects quickly. In other words,
>
> for( unsigned i=0; i<some_large_dynamic_number; i++ )
> ar & ptr[i];
>
> is not desirable (or perhaps modern compilers actually do a
> sufficiently good job at optimizing this case? opinions?)
>
> Is this a case where I'd be better to specialize my "serialize"
> method for both text_?archive (portable) and binary_?archive (fast),
> and then further split the binary case into save/load, which would in
> turn invoke save_binary and load_binary (as appropriate)?
>
> In this case (assuming the above is right, and out of curiosity) why
> is there no "serialize_binary" method instead of separate
> save/load_binary methods? I'm thinking that with this method, there
> would be no need to split "serialize" into "save"/"load" for this
> case...
>
> Thank you,
> Danny
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