c++ - Advantages of a bit matrix over a bitmap -
i want create simple representation of environment represents if @ position object or not.
i need big matrix filled 1
's , 0
'. important work on matrix, since going have random positioned , set operations on it, iterate on whole matrix.
what best solution this? approach create vector of vectors containing bit elements. otherwise, there advantage of using bitmap?
note while std::vector<bool>
may consume less memory slower std::vector<char>
(depending on use case), because of bitwise operations. optimization questions, there 1 answer: try different solutions , profile properly.
Comments
Post a Comment