AedonEtLIRA AedonEtLIRA - 1 month ago 20
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.

EDIT 1:
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

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.

Comments