Loop micro-optimization

rajmaharjan

Raj Maharjan

Posted on June 18, 2020

Loop micro-optimization

loop

Because:

  1. For loop uses one less variable
  2. Count down to 0 is usually faster because it's more efficient to compare to 0 than others.
💖 💪 🙅 🚩
rajmaharjan
Raj Maharjan

Posted on June 18, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Loop micro-optimization
javascript Loop micro-optimization

June 18, 2020