J
jacob navia
I am implementing the bitstring type in the container library, and
obviously I store the number of bits in a size_t...
Problem is, in 64 bit versions, size_t grows to 8 bytes, what
is an absolute overkill for a number that in most cases will
fit in 16 bits, or, at most 32.
And this happens in all containers. I do not see most applications
use containers with more than 4G elements... In a 64 bit system
size_t is just too much waste.
Now I see the problems Malcom was pointing at when he ranted at size_t.
What would be the alternatives?
uin32_t?
That one looks better. Any problem with that?
obviously I store the number of bits in a size_t...
Problem is, in 64 bit versions, size_t grows to 8 bytes, what
is an absolute overkill for a number that in most cases will
fit in 16 bits, or, at most 32.
And this happens in all containers. I do not see most applications
use containers with more than 4G elements... In a 64 bit system
size_t is just too much waste.
Now I see the problems Malcom was pointing at when he ranted at size_t.
What would be the alternatives?
uin32_t?
That one looks better. Any problem with that?