title: Constexpr vs Template Metaprogramming - performance differences
body: <p>I can see constexpr is winning more and more territory and one of the arguments for its use over template metaprogramming (TMP) is performance. My questions are:</p>
  
  <ol>
  <li><p>Are there any examples of performance comparisons in this regard?</p></li>
  <li><p>And why not replace TMP with constexpr if it is better? </p></li>
  </ol>
  
  <p>TMP guarantees that it is run compile-time, but that can be done with constexpr too. Constexpr handles floating point numbers, which TMP doesn't and for all the examples I've seen, constexpr functions that replace TMP are <em>easier</em> to read and use less lines of code. Also constexpr allows conditions and loops while TMP only handles recursive "simulations" of loops.</p>
  
  <p>I've asked in here earlier (<a href="https://stackoverflow.com/q/59522226/11208147">link</a>) about a related question - where I have 3 different ways of doing metaprogramming - here the constexpr function-way is the preferred..</p>