AedonEtLIRA AedonEtLIRA - 1 year ago 163
Android Question

Float or Double?

Which is faster, double or float, when preforming arithimic (+-*/%), and is it worth just using float for memory reasons? Precision is not an issue much of an issue.

Feel free to call me crazy for even thinking this. Just curious as I see the amount of floats I'm using is getting larger.

The only reason this is under android is because that is where I believe memory matters; I wouldn't even ask this for desktop development.

Answer Source

I wouldn't advise either for fast operations but I would believe that a operations on floats would be faster as they are 32 bit vs 64 bit in doubles.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download