Performance of Serialized Objects in C++
- by jm1234567890
Hi Everyone,
I'm wondering if there is a fast way to dump an STL set to disk and then read it back later.
The internal structure of a set is a binary tree, so if I serialize it naively, when I read it back the program will have to go though the process of inserting each element again. I think this is slow even if it is read back in correct order, correct me if I am wrong.
Is there a way to "dump" the memory containing the set into disk and then read it back later? That is, keep everything in binary format, thus avoiding the re-insertion.
Do the boost serialization tools do this?
Thanks!
EDIT: oh I should probably read, http://www.parashift.com/c++-faq-lite/serialization.html I will read it now... no it doesn't really help