PreviousNext
Setting zeroed variables
Help > Appendix > Code Optimization > Setting zeroed variables

FLASH-                        RAM                Speed+

 

When it is for sure the variable is already zero the new value can be ORed in and it might lead to the more efficient code (setting just one bit).

 

memoryLimit = 64;

eeeWriteData( 0 );

// memoryLimit is zero so the next statement takes 1 instruction

memoryLimit |= 64;

eeeWriteData( 0 );