(no title)
12thwonder | 4 years ago
struct Foo{
bool some_flag : 1;
bool other_flag : 1;
....
}
?12thwonder | 4 years ago
struct Foo{
bool some_flag : 1;
bool other_flag : 1;
....
}
?
MontyCarloHall|4 years ago
isidor3|4 years ago
Turned out that it was actually significantly faster to use one byte per boolean and forgo the masking operations. I assume the processor was just good enough at keeping its cache filled in that particular workload, so the additional masking operations just slowed things down. So I understand why you might not want a compiler to automatically do this.
coolreader18|4 years ago
unknown|4 years ago
[deleted]