News for hackers. Stuff that matters.
Re:Which one will execute faster, if(flag==0) or if(0==flag)? by mynameishere on Friday January 07, 2011 @11:33PM (#2082215)
No. If it matters you have a job involving oses or control systems or game engines and shouldn't be asking on stackoverflow.
Re:Which one will execute faster, if(flag==0) or if(0==flag)? by burgerbrain on Friday January 07, 2011 @11:56PM (#2082282)
No, even then you're doing it wrong. Either: your compiler should optimize it properly and you shouldn't be worrying about it, or you shouldn't be doing it in C anyway.

If the difference between the two is actually important, then chances are your compiler is doing a myriad of other things significantly sub-optimally as well. Most likely far more sub-optimally than the difference between either of those.

Re:Which one will execute faster, if(flag==0) or if(0==flag)? by rcfox on Friday January 07, 2011 @11:37PM (#2082225)
Even though most questions are about gluing GUI libraries to databases, that doesn't mean questions about OS or game engines are disallowed.
Re:Which one will execute faster, if(flag==0) or if(0==flag)? by __david__ on Saturday January 08, 2011 @02:52AM (#2082599)
I think the implication was that if you are programming at that level then you shouldn't be asking beginner questions (instead of just testing yourself).