From: Greg Chicares (chicares_at_[hidden])
Date: 2001-07-26 18:42:49
[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 or
> LE) that stores into the appropriate binary format and converts from it on
> every read.
> Reading the file back in is as simple as mmap() and casting the pointer to
> the start to an object of the appropriate time. This is a speed advantage
> 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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk