Possible Duplicate:
Which one will execute faster, if(flag==0) or if(0==flag)?
I usually write my equality conditions as:
if(0==x)
as many people do, instead of
if(x==0)
so that the compiler will tell me when I accidentally type = instead of ==.
Someone told me that some compilers implement this as two register loads, instead of one using a not-equal-zero operation, and so it is less efficient.
Anyone know if this is a reasonable comment?