Speed of Comparison operators

后端 未结 6 2274
走了就别回头了
走了就别回头了 2020-12-19 08:45

In languages such as... well anything, both operators for < and <= (and their opposites) exist. Which would be faster, and how are they interpreted?

6条回答
  •  感动是毒
    2020-12-19 09:39

    Have you considered that both those arguments are different? In case x and y are floating point numbers - they may not give the same result. That is the reason both comparison operators exists.

提交回复
热议问题