title: Do macros in C++ improve performance?
body: <p>I'm a beginner in C++ and I've just read that macros work by replacing text whenever needed. In this case, does this mean that it makes the .exe run faster? And how is this different than an inline function?</p>
  
  <p>For example, if I have the following macro :</p>
  
  <pre><code>#define SQUARE(x) ((x) * (x))
  </code></pre>
  
  <p>and normal function :</p>
  
  <pre><code>int Square(const int&amp; x)
  {
      return x*x;
  }
  </code></pre>
  
  <p>and inline function :</p>
  
  <pre><code>inline int Square(const int&amp; x)
  {
      return x*x;
  }
  </code></pre>
  
  <p>What are the main differences between these three and especially between the inline function and the macro? Thank you.</p>