I’m afraid to admit, I haven’t used C++ for a while now but i’m afraid I have to now, and I’m a bit rusty.
I need to have a bitmap, and I do care about performance, my bitmap size will be no longer then 25 bits.
I was thinking about using unsigned int, but I am afraid I do not remember how it is implemented in c/c++
Is unsigned int implemented as a regular binary number?
I am also open to any other suggestions for a bitmap.
thanks in advance for the help!
Use an
std::bitset<25>from the header<bitset>.bitsetcan be indexed with[]and is a template, so it likely expands to just anunsigned int(or equivalent) with all operations inlined.