Imagine I have a program that needs to check if a variable i
is greater than zero. i
is always positive, so saying that i > 0
is equivalent to saying i != 0
.
Is there a performance difference between those two expressions and why?
I am aware that there isn't a noticable performance difference, this is more of a philosophical question.