C IF statement efficiency...
U23405 at UICVM
U23405 at UICVM
Sat Aug 13 12:12:46 AEST 1988
I was wondering if, of the two following program fragments, which one would
be compiled more efficiently by most C compilers:
if (big > small) if (big > small)
return big; return big;
else return small;
return small;
In other words, does a compiler handle IF statements with RETURNs more or less
efficiently than IF..ELSE statements with RETURNs (or with other statements
besides RETURN, for that matter) ?
Michael Steiner
Email: U23405 at UICVM
More information about the Comp.lang.c
mailing list