More extensions to C
Ron Natalie <ron>
ron at brl-sem.ARPA
Sun Jun 1 16:50:28 AEST 1986
In article <856 at bentley.UUCP>, kwh at bentley.UUCP (KW Heuer) writes:
>
> >(BTW, a really good optimizing compiler can optimize out the temporary. I'm
> >not fully up on what optimizers are doing these days, but I doubt that there
> >are many compilers which do this. Optimizing it out is easier if it is
> >declared locally ("{int temp = x; x = y; y = temp;}") instead of being
> >declared at the top of the routine.)
>
> Unfortunately, I think the "clue" gets lost before the optimizing phase.
>
Eh? Unless you have a machine that has an exchange operator, the compiler
is going to have to allocate a temporary anyhow. I can't see yow a compiler
could generate better code for x,,y than what most compilers (even before
optimization do for {register temp =x; x=y; y=temp}.
-Ron
INEWS SUCKS
INEWS SUCKS
INEWS SUCKS
INEWS SUCKS
More information about the Comp.lang.c
mailing list