• antirez's avatar
    BITCOUNT performance improved. · 7c34643f
    antirez authored
    At Redis's default optimization level the command is now much faster,
    always using a constant-time bit manipualtion technique to count bits
    instead of GCC builtin popcount, and unrolling the loop.
    
    The current implementation performance is 1.5GB/s in a MBA 11" (1.8 Ghz
    i7) compiled with both GCC and clang.
    
    The algorithm used is described here:
    
    http://graphics.stanford.edu/~seander/bithacks.html
    7c34643f
bitops.c 10.1 KB