1. 24 5月, 2012 3 次提交
    • A
      popcount() optimization for speed. · d12a68d4
      antirez 提交于
      We run the array by 32 bit words instead of processing it byte per byte.
      If the code is compiled using GCC __builtin_popcount() builtin function
      is used instead.
      d12a68d4
    • A
      BITCOUNT refactoring. · 7ffa248c
      antirez 提交于
      The low level popualtion counting function is now separated from the
      BITCOUNT command implementation, so that the low level function can be
      further optimized and eventually used in other contexts if needed.
      7ffa248c
    • A
      Bit-related string operations moved to bitop.c · 84ec6706
      antirez 提交于
      All the general string operations are implemented in t_string.c, however
      the bit operations, while targeting the string type, are better served
      in a specific file where we have the implementations of the following
      four commands and helper functions:
      
          GETBIT
          SETBIT
          BITOP
          BITCOUNT
      
      In the future this file will probably contain more code related to
      making the BITOP and BITCOUNT operations faster.
      84ec6706