【发布时间】:2014-05-12 15:01:43
【问题描述】:
如果有这种情况:
int baseValue = (3 * value) / 100
并在各种情况下使用此值。
int width = baseValue;
int height = baseValue;
int length = baseValue;
存在一些不同之处,一次多做一次? (这不是个案,只问有疑问)
例如:
int width = (3 * value) / 100;
int height = (3 * value) / 100;
int length = (3 * value) / 100;
在所有情况下,结果都是一样的
在这种情况下会使用更多处理吗?
谢谢...
【问题讨论】:
-
Exist something of difference, of do this more of one time? (This is not case, only ask by question of doubt)这是完整的单词沙拉 -
我想我明白了......使用直接分配计算可能会有纳秒的差异,但这本质上是无关紧要的。
-
感谢您的回复,对不起我的英语......我做了测试,并将值“保存”在一个更有效的变量中
标签: process