|
From: Steve H. <S.W...@ec...> - 2002-11-13 17:44:15
|
On Wed, Nov 13, 2002 at 11:35:58 -0600, Richard A. Smith wrote: > On 13 Nov 2002 17:47:14 +0100, Benno Senoner wrote: > > > The strange thing is that on most modern x86 CPUs using doubles is as > > fast/faster than floats. That's good :-) > > > > Perhaps thats due to data bus size and the FPU size. Modern x86s > FPUs are 80-bit IIRC. The data bus is 64 bits wide so fetching a > double or float from memory take the same ammount of cycles. The 80bit format is mainly internal, its used to maintain IEEE compatibility in the 387 as I understand it. SSE does not use it. The problem with using doubles (64bit) or long doubles (80bit) in your code is the cache effects. You still have the same number of fp stack registers though. See Tim G.'s early attemps with ladspa filters, it makes no difference when thats the only thing running, but when you add more processes it becomes much slower. If using doubles was actually faster you may have missed the trailing f off a constant or used, eg. sin() instead of sinf(). - Steve |