This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [offtopic] float vs. double?
- To: nyap at garban dot com (Noel Yap)
- Subject: Re: [offtopic] float vs. double?
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Tue, 4 Aug 98 17:25:24 PDT
- Cc: nbecker at fred dot net, egcs at cygnus dot com
> Although I haven't done any benchmarks, the general literature says that
> using double is faster on modern CPU's.
Only if you have the values in registers already. If the floats or
doubles are in large arrays, which exceed the size of your cache, the
bottleneck is moving those arrays through the processor and writing the
results to RAM, and the float arrays are twice as fast.