This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [offtopic] float vs. double?



> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]