speed of base conversion
Russell L. Carter
sun!ew06.nas.nasa.gov!rcarter
Tue Jun 12 14:11:19 PDT 1990
Several recent comments are concerned with the speed of
base conversions and how it affects the overall execution time of
applications. The problem seems to stem from the incompatibility of
floating point formats across hardware, perhaps connected by networks,
perhaps connected by tape. I would like to suggest that when sheer speed
is desired, output is written unformatted, and then transferred (unformatted)
to the incompatible machine. A conversion program is then used to convert
to native format. Thus, no base conversion problems arise. This is the
solution used at NAS to share unformatted files among Amdahl, Sun, Iris, VAX,
and of course Cray computers. If the customers are really concerned
about speed, unformatted is the way to go, since the speeds of unformatted
writes and reads are always significantly greater than ascii. If running
a conversion program is too much trouble, then speed *really* isn't
the limiting factor here.
I would submit that the importance of correctly reading and writing
decimal constants outweighs the inconvenience of writing the conversion
program. Sloppy arithmetic invariably bites when least expected (and
desired.)
Russell Carter
rcarterawilbur.nas.nasa.gov
More information about the Numeric-interest
mailing list