Promotion rules ... why no float?

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 6 22:31:08 PDT 2016


Dne 6.9.2016 v 22:51 deadalnix via Digitalmars-d napsal(a):

> On Tuesday, 6 September 2016 at 07:52:47 UTC, Daniel Kozak wrote:
>> No, it is really important rule. If there will be automatic promotion 
>> to float for auto it will hurt performance
>> in cases when you want int and it will break things.
>>
>
> The performance have nothing to do with it. In fact float division is 
> way faster than integer division, try it. It is all about correctness. 
> Integer and floating point division have different semantic.
>

You are right, on my pc speed is same, but I am remember that there has 
been some performance problems last time i checked (something about only 
one FPU on my bulldozer cpu)



More information about the Digitalmars-d mailing list