Skip to content
  • Michael Forney's avatar
    Use bitwise test instead of __builtin_popcount · 39c0d633
    Michael Forney authored
    
    
    __builtin_popcount might not be available on all compilers, so using
    it requires a configure check and fallback implementation. In fact
    on gcc without an -march flag, it gets compiled to a function call to
    libgcc. However, we only need to test whether multiple bits are set,
    and this can be done easily with a bitwise and.
    
    Signed-off-by: default avatarMichael Forney <mforney@mforney.org>
    39c0d633