PreviousNext
== 0xFF is more efficient than != 0xFF
Help > Appendix > Code Optimization > == 0xFF is more efficient than != 0xFF

FLASH-                        RAM                Speed+

 

A test == 0xFF is more efficient (INCFSZ) than a test != 0xFF.

 

if ( var1 != 0xFF )

  nop2();

else

  nop();

if ( var1 == 0xFF )

  nop();

else

  nop2();