float或double?float、double

2023-09-04 06:12:53 作者:狂或野

这是更快,双重或浮动,当preforming arithimic(+ - * /%),并值得只是用浮法内存原因? precision不是一个问题,大问题。

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.

编辑1: 这是在机器人的唯一原因是因为这是我认为内存的事项;我甚至不会问这个桌面的发展。

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.

推荐答案

我不会建议无论是快速的操作,但我相信,在彩车一个操作会更快,因为他们是32位和64双打位。

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.