Reputation: 2921
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:
Obviously std::bitset
's functionalities are too limited for that, any recommendations?
Upvotes: 11
Views: 1963
Reputation: 41170
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_popcount
to count 1 bits, and mpn_copyi
to extract sub-sequences.
Upvotes: 11