Answers

Question and Answer:

  Home  Embedded Software Engineer

⟩ Tell me is Count Down_to_Zero Loop better than Count_Up_Loops?

Count down to zero loops are better. Reason behind this is that at loop termination, comparison to zero can be optimized by the compiler. Most processors have instruction for comparing to zero. So they don't need to load the loop variable and the maximum value, subtract them and then compare to zero. That is why count down to zero loop is better.

 171 views

More Questions for you: