Precedent for use of =

gaynor at topaz.UUCP gaynor at topaz.UUCP
Sun Jul 13 16:01:01 AEST 1986


In article <5057 at sun.uucp>, guy at sun.uucp (Guy Harris) writes:
> If your compiler can't generate equally efficient code for
> 
> 	a = b;
> 	if (a != 0)
> 
> and
> 
> 	if ((a = b) != 0)
> 
> on any machine other than an incredibly weird one, then your compiler needs
> to be improved.

Ideally, degrees of optimization should be available, offering
trade-offs between code-speed vs code-space vs compilation-time vs
code-size, and optional code generation, to name the biggies.  For
example, when debugging syntax errors, why waste time generating code
when all you want to do is check the syntax?  When verifying a
program's correctness, your not going to need really good code, just
something done quick-n-dirty (to save on system resources).  For
production, the trade-off of code-size vs code-speed rears its ugly
head (code-size is very important when, say, you try to port gnu-emacs
to a small computer).  I reiterate, this is the ideal situation.


                         _   /|
                         \`o_O'
                           ( )   Aachk! Phft!   
                            U

Disclaimer: The opinions and/or information and/or code expressed
            here were generated by this characature, stolen from
            Dave Rasmussen, to which I have taken the liberty of
            adding ears.  So don't look to me for a disclaimer!

Silver  {...!topaz!gaynor}



More information about the Comp.lang.c mailing list