Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-07-27 10:50:37

At 07:42 PM 7/26/2001, Greg Chicares wrote:
>[Have you examined the persistency stuff in the files area?]
>Paul Mclachlan wrote:
>> At 17:46 07 Jul 2001 -0000, michel.andre_at_[hidden] wrote:
>> > Would there be any interest in an persistent vector with the exact
>> > same interface as std::vector that stores it's data in a persistent
>> > file? Preferably implemented using memory mapped files on plattforms
>> > were they are supported.
>> >
>> > Of course there are restrictions on the data contained in such a
>> > vector it may not contain any dynamically allocated data or pointers.
>This seems to focus on the container rather than its elements. Is this
>intended mainly as a C++ wrapper around memory-mapped files, rather than
>as a more general object persistency framework?
>> I handle endian-ness issues (at present) with a wrapper type (either BE

>> LE) that stores into the appropriate binary format and converts from it

>> every read.
>> Reading the file back in is as simple as mmap() and casting the pointer

>> the start to an object of the appropriate time. This is a speed
>> when compared to marshalling (serializing?) to disk.
>How great a speed advantage do you get by using a binary format?
>'0x4000c90fdaa22168c235' is faster, but '3.14159265358979323846L'
>works on more machines and produces a human-readable file. Would
>it make sense to use a portable character representation first,
>then examine performance enhancements later?

You might want to look at the persistence work-in-progress in the Boost
CVS. It addresses those issues. There has been a suggestion that
"serialize" might be a better name.


Boost list run by bdawes at, gregod at, cpdaniel at, john at