2 ms·
> What are the users for popcount? https://en.wikipedia.org/wiki/Hamming_distance#History_and_applications https://en.wikipedia.org/wiki/Hamming_distance#Histo
by garmaine 7y ago
> What are the users for popcount?
https://en.wikipedia.org/wiki/Hamming_distance#History_and_applications https://en.wikipedia.org/wiki/Hamming_distance#History_and_a...
EDIT: What might not have been obvious is that popcount combines with other operations well. E.g. popcount(A ^ B) gives the number of bits that differ. popcount(A & B) gives the number of bits that are the same. popcount(A) gives the number of options set in a flag field. etc., etc.