slightly faster implementation of bitset