Matrix mul

Sergey Gromov snake.scaly at gmail.com
Sun Nov 23 07:10:15 PST 2008


Sun, 23 Nov 2008 07:33:16 -0600, Andrei Alexandrescu wrote:

> Sergey Gromov wrote:
>> The really weird part is, if I comment out the "init mats randomly" loop
>> in #1, it becomes twice as slow, i.e. 20s against the original 10s.  I
>> don't get it.
> 
> I think what happens is that the speed of FP arithmetic depends on the 
> values of the operands. Whenever a NaN is involved everything gets a lot 
> slower (tested that).

I'm always forgetting that an uninitialized double is NaN...  That
should be the reason for at least this slowdown.



More information about the Digitalmars-d mailing list