More efficient "if"?

Правка en1, от 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.

Теги c++, efficiency

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский shervin 2015-06-11 21:16:49 310 Initial revision (published)