The 64-bit bool sounds like a terrible idea for x86-64. I assume that the one who wrote it was thinking about 32-bit machines with 32-bit pointers at that time.
Modern x86 has very good support for unbalanced loads / storages and for unpacking bytes to fill the register on the fly. If x86 is the main goal, you need to use 8 bits of boolean, esp in cases where it saves bytes, which leads to less use of the cache. In the rare case when the cache is not a problem, 32 bits is a natural size and may save instructions in some cases when a logical value is added or multiplied directly with int , allowing you to use the logical value as a memory operand instead of loading from using movzx .
For the usual case of test branches on the logical processor, Intel and AMD have literally zero performance difference between 8-bit and 32-bit operands, regardless of whether they are in memory or in register.
source share