title: Why is {fmt} slower than std::stringstream?
body: <p>From what I read online the {fmt} library is supposed to be incredibly much faster than e.g. stringstreams.</p>
  <p>However, I did some simple benchmarking (measuring system time, see code below) and it seems that {fmt} is always slower than e.g. stringstreams. Am I getting something wrong?</p>
  <pre><code>uint64_t start;
  uint64_t stop;
  
  long MAXCOUNT = 10000000;
  
  std::srand(123);
  
  int* numbers =  new int[MAXCOUNT];
  for ( int i = 0; i &lt; MAXCOUNT; i++) {
      numbers[i] = std::rand();
  }
  
  {
      std::string result;
      start = currentTimeInMillis();
      for ( int i = 0; i &lt; MAXCOUNT; i++) {
          result += fmt::format(&quot;Number {} is great!&quot;, numbers[i]);
      }
      stop = currentTimeInMillis();
      fmt::print(&quot;timing fmt : {} ms   /   string length: {}\n&quot;, stop-start, result.size());
  }
  
  
  {
      std::string result;
      std::stringstream ss;
      start = currentTimeInMillis();
      for ( int i = 0; i &lt; MAXCOUNT; i++) {
          ss &lt;&lt; &quot;Number &quot; &lt;&lt; numbers[i] &lt;&lt; &quot; is great!&quot;;
      }
      result = ss.str();
      stop = currentTimeInMillis();
      fmt::print(&quot;timing stds: {} ms   /   string length: {}\n&quot;, stop-start, result.size());
  }
  </code></pre>
  <p>A typical result (optimization level O3 - less is even worse) of this code is:</p>
  <pre><code>timing fmt : 1414 ms   /   string length: 264823200
  timing stds: 1287 ms   /   string length: 264823200
  </code></pre>