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?



> For very large vectors and matrices of numbers, the speed differences due to
> memory usage and the amount of data that needs to be copied around
> is likely to be much greater than the differences between the speed
> of the computations themselves, so float could sometimes give a real
> advantage.

Figure out how many muliplies you can do in one cache miss time (the
answer often exceeds 20).  As soon as you don't fit in cache, float is
twice as fast as double, because the critical path is the I/O.


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