Mail Archives: djgpp/2000/01/16/22:27:58
David Cleaver wrote:
> Hello all,
>
> I was wondering about how DJGPP would handle a very large if statement
> which contained alot of '&&' in it. Does the compiler make it so that
> the instant it hits a 'false' value it breaks out, or does it continue
> through all of tests and then does the '&&' operation(s) later? I need
> to know in order to try and optimize a program that I am writing. Any
> help you can give will be greatly appreciated. Thanks for you time.
>
> -David C.
Does it have any '||' in it?? Otherwise, the C def req's shortcut
evaluation, so yes, if I understand correctly, it will exit out as soon as
the statement is known to be false. (A little vague, I know. I only know a
little bit from some comp.sci courses I took a few years back)
- Raw text -