title: How can I optimize C++ for loops/if statements?
body: <p>Is there anyway to make c++ code run faster, im trying to optimize the slowest parts of my code such as this: </p>
  
  <pre><code>    void removeTrail ( char floor[][SIZEX],int trail[][SIZEX])
  {
      for (int y=1; y &lt; SIZEY-1; y++)                                         
          for (int x=1; x &lt; SIZEX-1; x++)
          {   if (trail [y][x] &lt;= SLIMELIFE &amp;&amp; trail [y][x] &gt; 0)  
              {   trail [y][x] --;                                        
                  if (trail [y][x] == 0)                                  
                      floor [y][x] = NONE;                                    
              }
          }
  }
  </code></pre>
  
  <p>Most of the guides i have found online are for more complex C++.</p>