More efficient "if"?

Revision en1, by shervin, 2015-06-11 21:16:49

Hello,
i am just curious, i want to know if we have a bool like X, and if we want to check if it is 0, which if statement is more efficient This->if(!X) or This->if(x^1).(i checked the asm code and the codes were not the same so i think they defer from one another.)
Thanks.

Tags c++, efficiency

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English shervin 2015-06-11 21:16:49 310 Initial revision (published)