Hacker News new | ask | show | jobs
by cogman10 54 days ago
Only if you have an application which can somehow utilize an array of bits. It's been quite rare in my career to see that in practice. I know of only a few corner cases.

Regardless, due to the way most CPUs work, you almost certainly aren't saving anything by using a bit instead of a byte. When a CPU goes to load a memory address it'll not just get that address, but also the addresses around that address and shove them into cache. With the thought that "If you are loading 1 byte, you are likely loading 128 bytes". The cost savings really only comes into effect when you have more boolean values than bytes that fit in a cache line.