Hello,
Does anyone know which one of these two if statements that is fastest to execute?
I know the first one is safer, but I think the later is faster. But I don't really know.Code:#define ALPHA 0x01 #define BETA 0x04 #define GAMMA 0x08 #define DELTA 0x10 ... if (flag == ALPHA || flag == GAMMA) printf("ok!"); else printf("error"); if (flag & (ALPHA | GAMMA)) printf("ok!"); else printf("error");