Boost logo

Boost :

From: dylan_nicholson (dylan_nicholson_at_[hidden])
Date: 2002-03-01 00:17:53

--- In boost_at_y..., "rameysb" <ramey_at_r...> wrote:

> Portability and utility demands the numbers be in some sort of
> canonical form. I chose text rendition numbers as that canical
> Why did I choose this one? Well its the first that came to mind
> there is a real reason. This permits us to leverage on the
> float/text conversion functions already programmed for streams in
> standard library. What is the point of writing our own? Are they
> going to be better than the ones in the standard library? are they
> going to be faster? use much less space? more robust? I doubt it.
Actually speed is a really big issue. We attempted using an LZ
compressed ASCII format for what are coincidentally enough
essentially CAD models, and determined that the sheer time it took to
parse all the ascii representations of floating point numbers was
unacceptable (the compression time was less significant, but only
made matters worse. And the size of the ASCII files made compression
necessary). Hence we changed to an in-house binary format (I would
have preferred XDR, which is what we use elsewhere, but so be it),
and reduced load and save times by a factor of 10.

Basically what it comes down to it that any serialization that
doesn't allow you to override how low-level data types are serialized
is fairly useless. I suggested elsewhere that the stream class
itself should be templatized - I have written a binary_stream (it's
in the boost files section) that is completely compatiable with
std::iostream and uses XDR, so this is what I would use.


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