Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

slow floating point on Pentium 4

$
0
0
Hi,

I have performance issues with the following code:

...
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
add 1, %eax
cmp 10000000, %eax
...

basically: for (i = 0; i < 10000000; ++i) { a = a * b + c; }

when c != 0 it works 20 times faster than when c == 0.0

Does anybody have any ideas on what the problem is?

thanks,

--ckdh

Viewing all articles
Browse latest Browse all 152

Latest Images

Trending Articles



Latest Images