Compiler: What if condition is always true / false
<p>I think about conditionals and compilers. I am programming an application for Arduino and so I need the application to be as fast as possible.</p>

<p>In my code I have this:</p>

<pre><code>#define DEBUG false    

...

if (DEBUG)
{
  String pinName;
  pinName = "Pin ";
  pinName += pin;
  pinName += " initialized";
  Serial.println(pinName);
}
</code></pre>

<p>I am wondering if the compiler does not include the code (code in if block) in binary file. The conditions is always false, so the program never goes there.</p>

<p>And from the other side. What if DEBUG is true? Does Arduino test the condition or the compiler include only the body of if in binary file?</p>

<p>I found this site <a href="https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_4.html" rel="nofollow">https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_4.html</a> about #if directive, so I can rewrite the code to have these directives instead of "normal" if. But I would like to know if I should rewrite it or if it would be waste of time.</p>