Jun. 25th, 2013

Bugz [2/2]

Jun. 25th, 2013 06:10 pm
izard: (Default)
In a previous post, the code sequence I used to illustrate an issue was buggy on its own.

Here is the right one:
volatile float f1 = 2e-40f;
volatile float f2 = 3000000000.0f;
volatile float f3;

f3 = f1/f2;
f3 = f2/f1;

Regardless of x87 or SSE, the code above takes ~800 cycles without factor X, and 800 cycles to 5k cycles with factor X.
(Same for REP MOV which is another example of a complex microcode).

P.S. Factor X is very rare and so the issue is not too bad. Besides, 5k cycles is less than 2 microseconds so not a big deal for common PC/server uses either.

Profile

izard: (Default)
izard

August 2025

S M T W T F S
     12
3456789
10111213 141516
17181920212223
24252627282930
31      

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 15th, 2025 12:56 am
Powered by Dreamwidth Studios