53 ms·
I think that the generalized reverse instruction could have fit just fine, because the circuit that computes it is also capable of the complete set of shifts an
by brandmeyer 7y ago
I think that the generalized reverse instruction could have fit just fine, because the circuit that computes it is also capable of the complete set of shifts and rotations. Not sure about that generalized zip, though.
clz/ctz are pretty useful as priority decoders that show up in a variety of applications.
Carryless multiplication can subsume all of the CRC's.
What are the users for popcount?
- BeeOnRope 7y agopopcnt is all over the place once you start doing any interesting bitwise stuff at all.
- brandmeyer 7y agoCan you be more specific?
- snovv_crash 7y agoI've used it for bitwise hamming distance - xor+popcnt - having a hardware instruction on x86 made the entire pipeline over 6x faster.
- stochastic_monk 7y agoI’ve used popcounts for full vectorization for b-bit minwise hashing, comparing bloom filters efficiently, and bitvector traversal. It’s a standard primitive in a lot of low-level code.
- 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.