Some processors can handle unsigned integer arithmetic considerably faster than signed (this is also good practice, and helps make for self-documenting code).
一些处理器在处理无符号整型数要比处理符号整型数快得多,这也是一个好的习惯,有利于代码的自我文档化(self- documenting)。
Note that, in this example, sum must be initialized to an explicit floating-point value; otherwise, all the subsequent computations will be done using integer arithmetic.
注意,在本例中,sum必须被初始化为一个显式的浮点值;否则,所有后续计算都将使用整数运算计算。
Thus, providing 64-bit addressing and integer arithmetic capabilities involves changing the bindings or mappings of the existing data types, or adding new data types to the language.
因此,提供64位的寻址和整数运算能力必须要修改现有数据类型的绑定或映射,或者向c语言中添加新的数据类型。
Remember, integer arithmetic is much faster than floating-point arithmetic, as it can usually be done directly by the processor, rather than relying on external FPUs or floating point math libraries.
记住,整形数运算要比浮点数运算快得多,因为处理器可以直接进行整型数运算,浮点数运算需要依赖于外部的浮点数处理器或者浮点数数学库。
Since only integer arithmetic is used, speed of this algorithm is high.
该算法只使用整数运算,所以具有很快的速度。
Since only integer arithmetic is used, speed of this algorithm is high.
该算法只使用整数运算,所以具有很快的速度。
应用推荐