insert type of
입력에서 설정 비트 수를 계산하는 것에 대한 수많은 질문을 보았습니다. 그러나 그 이유는 무엇입니까? 비트 계산에 대한 알고리즘을 찾는 분들을 위해왜 비트 수를 계산하는 것이 유용한가요?
, 이쪽을 봐 :
- Counting common bits in a sequence of unsigned longs
- Fastest way to count number of bit transitions in an unsigned int
- How to count the number of set bits in a 32-bit integer?
당신의 CPU가'하지 않는 한 당신은 (직접 인구 수보다 적은 수의 운영과 패리티를 계산할 수 있습니다 POPCNT' 또는 유사). –