Rever count_1s() optimizations