In [1]:
import collections
In [2]:
l_100 = list(range(100))
In [3]:
%%timeit
collections.Counter(l_100)
In [4]:
l_10000 = list(range(10000))
In [5]:
%%timeit
collections.Counter(l_10000)
In [6]:
l_10000_2 = list(range(100)) * 100
print(len(l_10000_2))
In [7]:
%%timeit
collections.Counter(l_10000_2)