I'm a Delphi beginner, and messing with a program that uses floating point variables. However, when timing part of my code, I'm seeing a simple instruction like:
x := x + 1
taking literally thousands of CPU cycles to execute. Looking at the compiled code, I see this line turned into:
fld tbyte ptr [ebp-$20]
fadd dword ptr [$0045fa98] //I'm guessing this points to a "1" in FP,
//as the data is 3f 80 00 00
fstp tbyte ptr [ebp-$20]
Why must I 'wait' for this to execute? Shoudn't floating point on modern processors be quick? Is there some config option I need to turn on in Delphi 7 to fix this?