title: performance of std::string operator + versus stringstream
body: <p>I am migrating an old code base from using a custom implementation of strings to use std::string.  One of our engineers is concerned that this could lead to a performance issue where we are using += and + to concatenate relatively long strings.  His particular concern is how the memory is allocated as the string grows dynamically, and he suggested that stringstream would perform better in this regard.  For those of you tempted to respond "benchmark then optimize" or sentiments to those effect -- I do of course agree, and that's the plan.  I'm just wondering about the theory.</p>
  
  <p>I did a little searching for this issue, and ran into this question: 
  <a href="https://stackoverflow.com/questions/611263/efficient-string-concatenation-in-c">Efficient string concatenation in C++</a>, which is getting a little dated.</p>
  
  <p>Now I'm wondering:  Is the memory allocation algorithm for string += really different than that for string stream?  What about the copy issues raised in the above question -- have these changed with c++ 11/14?</p>