Boost logo

Boost :

From: Vesa Karvonen (vesa.karvonen_at_[hidden])
Date: 2001-12-20 08:45:59


From: "Ross Smith" <r-smith_at_[hidden]>
> Rainer Deyke wrote:
> > Right now I'm using my own binary serialization layer on top of iostreams.
> > This allows me to read and write binary files. Why should I need to
change
> > my code if I want to read from / write to sockets instead?
>
> Because that's a ridiculously inefficient way of doing binary I/O, and
> some of us don't want to be forced to pay the penalty merely because
> other people consider it acceptable.
>
> Iostreams are a disaster area; they violate the "you don't pay for what
> you don't use" rule right left and centre. Let's not throw good code
> after bad, please.

A few years ago I designed and implemented a very straightforward IO stream
system for binary IO. I then profiled it against MSVC++ IO streams. In debug
builds, my stream design literally had 50 times smaller overhead. In release
builds the advantage was only about half of that. :)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk