title: the way to compare string in an efficient way in C++
body: <p>Is it efficient to compare a string with another string or string literal like this?</p>
  
  <pre><code>string a;
  string b;
  if (a == "test")
  </code></pre>
  
  <p>or </p>
  
  <pre><code>if (a == b)
  </code></pre>
  
  <p>My coworker asked me to use memcmp</p>
  
  <p>Any comments about this?</p>
  
  <p>Thanks.</p>