I have a list of 9 million hash values. I need to compare each value(hash0) in the list with the rest of the values :
for i, hash0 in enumerate(hashes_list):
for hash1 in hashes_list[i:]:
if hash0 -hash1 < threshold:
#do something
This solution above is of quadratic complexity, which is taking forever to run (even in a server). What is an efficient way to cross-match these 9 million hashes?
Here is a sample of the hashes_list values :
8c59ac5169e673a6
ab9f545497b05683
9590ee98373e1e19
c1274a5e1e150e7f
938f7c782dc6241b