I have class A and class B. class A sets various flags(boolean variable) of class B during the text mining. And in final step, class B takes decision for different combinations of these flags. There are approx 10 boolean variables (may increase in future).
I wonder if I use single byte comparison instead of multiple boolean comparisons. So I'll not have to maintain big list of boolean variables as well as multiple comparisons can be avoided.
I have attempted it using bitwise operators while setting the values or in comparison Eg :
if(byteFlag == xb001010)
if((byteFlag ^ xb0000011) == xb0000011)
*plz ignore the raw code given above, this is just a rough example.
But I ended up with bad code which even dint gave me any performance improvement.
Please advice me if someone has used byte comparison instead of multiple comparison before or how to do this for better performance.