|Re: Encripted source as an ANDF (really FORTRAN vs C optimization) diomidis@ecrcvax.UUCP (1989-06-15)|
|Summary:||ANSI C allows some more optimisiations than traditional C|
|From:||diomidis@ecrcvax.UUCP (Diomidis Spinellis)|
|Organization:||ECRC, Munich 81, West Germany|
|Keywords:||FORTRAN C optimization trigonometric loop|
In article <email@example.com> firstname.lastname@example.org writes:
>The real fly in the ointment is that C semantics sabatoge many of the
>best optimizations currently available to other languages (like most
>good fortran compilers).
>2) "for" vs "do"
> (while the author of the proposal may think it best to reduce
> directly to GOTO's, DO loops ensure that the control variable may
> not be modified by anything in its body ... thus allowing many
> interesting optimizations ... w/o having to do extensive analysis)
The use of a ``register'' variable as a loop control variable insures
that no alias is used for that variable. Thus the compiler only has
to look at the code inside the loop body in order to determine if the
variable is modified or not. In most cases it will not be modified
and the interesting optimizations can be performed.
>4) trig functions (built into fortran) and many other items of interest in
> the "real "go fast"" community.
ANSI C defines the semantics of many functions including the trig functions.
Thus an ANSI C compiler is free to use inline code or known properties of
these functions. Many compilers that are conformant to ANSI drafts already
produce such code and Matthew Self (email@example.com) has posted
an almost ANSI conforming inline math library in gnu.gcc for the GNU C
compiler (message-ID <8903230250.AA00243@bayes.arc.nasa.gov>.
Diomidis Spinellis European Computer-Industry Research Centre
Arabellastrasse 17, D-8000 Muenchen 81, West Germany +49 (89) 92699199
USA: firstname.lastname@example.org ...!pyramid!ecrcvax!diomidis
Europe: email@example.com ...!unido!ecrcvax!diomidis
Return to the
Search the comp.compilers archives again.