This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [offtopic] float vs. double?
- To: jstern at citilink dot com (Josh Stern)
- Subject: Re: [offtopic] float vs. double?
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Tue, 4 Aug 98 17:33:03 PDT
- Cc: nbecker at fred dot net, nyap at garban dot com, egcs at cygnus dot com
> 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.