What will be faster, >= or >?
This question already has an answer here:
Both comparisons will be compiled to machine instructions like BLT
(branch on less than) or BLE
(branch on less equal), which check some status bits like BLT: NV + -NV
(negative & not overflow or not negative and overflow) or BLE: Z + NV + -NV
(zero or negative & not overflow or not negative and overflow).
These instruction take normally exactly the same time, so they are equally fast.
上一篇: 'for'循环中'<='与'<''
下一篇: 什么会更快,> =或>?