Comment Comment by mik1998 for i in 0:7 c += (r >> i) & 1 end This is just popcnt, surely Julia has a built in for that. parent mik1998 2 years ago