Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-11-18 11:45:13


At 10:46 PM 11/17/2002, Robert Ramey wrote:

>I will be very curious to see timings on this. There is no apriori
reason
>to know that the translation from native types <-> XDR is faster than
>native types <-> text

I did a detailed timing study some years ago. Binary was four times faster
round trip than text.

The study included enough tests and profiling to identify the sources of
the timing differences:

* The binary data averaged half the size of the text data. Thus I/O was
twice as fast for binary. Presumably this would hold for any hardware; I
would be suspicious of any timings that didn't show I/O of twice the data
taking longer.

* The internal form of the data was binary, and only needed byte-order
flipped for binary I/O. (The machine was little-endian and the portable
binary file format was big-endian.) The text format required conversion to
and from binary, and that was time-consuming on the particular machine.
Thus this portion of the results would vary according to the platform.

--Beman


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