[offtopic] float vs. double?
Joe Buck
jbuck@synopsys.com
Tue Aug 4 17:26:00 GMT 1998
> 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.
More information about the Gcc
mailing list