Serialization / Fast [non-portable] serialization for binary data

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

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
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
participants (2)
-
Dan Eaton
-
Robert Ramey