I have a small doubt
I have following code
bool res= false;if(cond1){ res = true;}if(cond2){ res = true;}
Instead of this if I put following code
if(cond1 || cond2){ res = true;}
Which code snippet will be more optimized?
I believe it would be second one as I have avoided an If condition.