Double types are faster than integer types?!! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Double types are faster than integer types?!!

hadipardishadipardis Posts: 134Member
I have a heavy loop in which many mathematical operations must be done. In my experiments I saw that working with double types are very faster than woking with integer and extended types or even byte types.But I don't know its reason? Do you know? Thanks

Comments

  • zibadianzibadian Posts: 6,349Member
    : I have a heavy loop in which many mathematical operations must be done. In my experiments I saw that working with double types are very faster than woking with integer and extended types or even byte types.But I don't know its reason? Do you know? Thanks
    :
    That's weird, since integers operations are faster than floating-point operations. But it might be that your integer calculation code wasn't fully optimized or that the CPU was busy with other processes during your test run, and thus the program didn't receive as many cycles as the run of the double calculations.
Sign In or Register to comment.