Basically, I want this:
Would I be able to write the above like this instead ?Code:if (v1) if (va==vb) f(); else if (v2) if (vc==vd) f();
I would assume so (although not tested).Code:if (((v1) && (va==vb)) || ((v2) && (vc==vd))) f();
However, in what order is the above guaranteed to be evaluated? Assume v1 & v2 are zero, will the produced code just check v1 and v2, and ignore va,vb,vc and vd? Or will it first check va==vb before checking v1 != 0 ? (ie, will it run exactly the same as first example?)
I want the code to run as quick as possible. I don't want to use multiple if statements and multiple possible function calls, unless there would be a speed improvement in doing so.