title: Faster form for hamming distance in c++ (potentially taking advantage of standard library)?
body: <p>I have two <code>int</code> <code>vectors</code> like <code>a[100]</code>, <code>b[100]</code>.<br>
  The simple way to calculate their hamming distance  is:</p>
  
  <pre><code>std::vector&lt;int&gt; a(100);
  std::vector&lt;int&gt; b(100);
  
  double dist = 0;    
  for(int i = 0; i &lt; 100; i++){
      if(a[i] != b[i])
          dist++;
  }
  dist /= a.size();
  </code></pre>
  
  <p>I would like to ask that is there a faster way to do this calculation in C++ or how to use STL to do the same job?</p>