title: c++11 speed comparison/cost std::hash<std::string> equal versus std::string equal directly on 2 large strings
body: <p>Hi I have a question on std::hash if I have 2 large strings for comparison and I am willing to accept that std::hash will compare equal in most cases is it more performance compliant to do something like the following instead of a direct string comparison? Also consider this will be in a loop reading a file so it will be executed several times which is the concern for large files.</p>
  
  <pre><code>std::string largeString1;  // large but not huge meaning a line of text like up to lets say 500 chars 
  std::string largeString2;
  
  // is this better than then next block in terms of performance and if so by how much?
  if ( std::hash&lt;std::string&gt;(largeString1) == std::hash&lt;std::string&gt;(largeString2) )
  {
  // true logic
  }
  
  // is this a lot slower than the previous
  if ( largeString1 == largeString2 )
  {
  // true logic
  }
  </code></pre>