Dealing with very large bool data set, try to use bit-wise operation to handle it, looking for some library that dealing with bit-set that can:
- Dynamic set, and can be passed by pointers or references.
- Read and write bitwisely.
- Count set bits and fast.
Obviously std::bitset‘s functionalities are too limited for that, any recommendations?
GMP provides low level bit functions on arbitrarily sized natural numbers. These are “low-level GMP functions, used to implement the high-level GMP functions, but also intended for time-critical user code.”
These include
mpn_popcountto count 1 bits, andmpn_copyito extract sub-sequences.