Question
Which flag definition would be faster ?
I have a lot of different flags in project, I wonder which style definition reads faster by processor .
Definition 1
typedef struct{
__IO uint8_t flag1 ;
. //other flags
}Flag_t ;
Definition 2
typedef struct{
__IO uint32_t flag1 : 1 ;
//other flags
.
}Flag_t ;
Definition 3
typedef struct{
__IO bool flag1
. //other flags
}Flag_t ;
Flag_t Flag;
int main(){
if(Flag.flag1&(bit masking) == SET){
//something..
}
}
