I came across several good compilers / architectures / functions in which moving boolean elements to bit fields greatly improved the quality and performance of the code.
Unfortunately, GCC is not one of those compilers (or was not the last time I tested this).
When everything is in order, storing several Boolean elements in one register can ease a lot of pressure in the register, which eliminates a lot of spills on the stack and makes the rest of the code much more efficient.
If the architecture has a sufficient set of instructions for processing bits, then verification and manipulation operations can be compact or more compact than comparable operations to extract logical data from entire registers or, even worse, to stack.
As a rule (even on x86), bit-packing of logical data should lead to more efficient code, but the limitation is the compiler.
source share