Which one will execute faster, if (flag==0) or if (0==flag)?

后端 未结 16 788
灰色年华
灰色年华 2020-11-30 17:12

Interview question: Which one will execute faster, if (flag==0) or if (0==flag)? Why?

16条回答
  •  时光取名叫无心
    2020-11-30 18:01

    Surely no difference in terms of execution speeds. The condition needs to be evaluated in both cases in the same way.

提交回复
热议问题