[SciPy-User] writing data to binary for fortran
Francesc Alted
faltet at pytables.org
Thu May 13 08:18:19 EDT 2010
A Thursday 13 May 2010 13:38:56 John Hassler escrigué:
> "Back in the day," double precision was MUCH slower than single precision
> arithmetic, so Fortran used single precision by default. You used double
> precision only when absolutely necessary, and you had to call it
> explicitly. Fortran even had separate "built-in" functions for single and
> double - eg., sin, dsin, log, dlog, etc. - that the user called
> explicitly. (I haven't used Fortran for 20 years, but I think modern
> Fortran recognizes the type of argument, now.)
>
> Single and double precision are about the same speed on modern processors,
> and double is sometimes even faster than single on 64 bit processors
Beware! This is so only for basic arithmetic operations. For computation of
transcendent functions (sin, cos, atanh, sqrt, log...), single precision is
still way faster (they require much less computations to reach the precision).
> (because of the ancillary data shuffling, I think). However, Fortran is
> dragging nearly 60 years of history along with it, so I'm not surprised
> that it defaults to single precision.
>
> john
--
Francesc Alted
More information about the SciPy-User
mailing list