title: Python Runtime of collections.Counter Equality
body: <p>I am wondering what the big-O runtime complexity is for comparing two <code>collections.Counter</code> objects. Here is some code to demonstrate what I mean:</p>
  
  <pre><code>import collections
  counter_1 = collections.Counter("abcabcabcabcabcabcdefg")
  counter_2 = collections.Counter("xyzxyzxyzabc")
  comp = counter_1 == counter_2  # What is the runtime of this comparison statement?
  </code></pre>
  
  <p>Is the runtime of the equality comparison in the final statement O(1)? Or is it O(num_of_unique_keys_in_largest_counter)? Or is it something else?</p>
  
  <p>For reference, here is the source code for <code>collections.Counter</code> <a href="https://github.com/python/cpython/blob/0250de48199552cdaed5a4fe44b3f9cdb5325363/Lib/collections/__init__.py#L497" rel="nofollow noreferrer">https://github.com/python/cpython/blob/0250de48199552cdaed5a4fe44b3f9cdb5325363/Lib/collections/<strong>init</strong>.py#L497</a></p>
  
  <p>I do not see the class implementing an <code>__eq()__</code> method.</p>
  
  <p>Bonus points: If the answer to this question changes between python2 and python3, I would love to hear the difference?</p>