Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
performance [2019/09/03 08:55] – [Tip #9: Know the optimizer] neilsperformance [2021/01/10 19:21] (current) – [Tip #3: Do arithmetic only when necessary] gabrielsroka
Line 15: Line 15:
 ==== Tip #3: Do arithmetic only when necessary ==== ==== Tip #3: Do arithmetic only when necessary ====
  
-Even the simplest addition or substraction can take precious time, especially when used in loops. Make sure to eliminate all the arithmetic operations that are not necessary in runtime.+Even the simplest addition or subtraction can take precious time, especially when used in loops. Make sure to eliminate all the arithmetic operations that are not necessary in runtime.
  
 Wrong example: Wrong example: