float或double? [英] Float or Double?

查看:173
本文介绍了float或double?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是更快,双重或浮动,当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.

这篇关于float或double?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆