阅读背景:

如果可能的话,最好避免使用mod操作符吗?

来源:互联网 

I assume that calculating the modulus of a number is a somewhat expensive operation, at least compared to simple arithmetic tests (such as seeing if a number exceeds the length of an array). If this is indeed the case, is it more efficient to replace, for example, the following code:I assume that calculating the modulus of a numb




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: