Boost logo

Boost Users :

Subject: [Boost-users] Serialization / Fast [non-portable] serialization for binary data
From: Dan Eaton (daniel.eaton_at_[hidden])
Date: 2009-05-13 19:29:00


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