从数字中减去变量并设置变量的最快方法是什么?

What is the quickest way to subtract a variable from a number and set the variable?

有没有更快的方法x = 128 - x

简答:否

如果它是 2 的幂的除法或乘法,您可以使用移位运算符使其更快,但在这种情况下,没有什么比 x = 128 - x

更好的了