Optimization and language level

D Gary Grady dgary at ecsvax.UUCP
Sat Dec 22 01:06:15 AEST 1984


<>
It has been noted that programmers sometimes need a language that does a
lot of optimization, but that sometimes they need one that does a fairly
simple-minded translation.  I wonder if it would be worth it for
language designers and implementors to consider allowing local control
of optimization by means of statement (or even expression-level)
pragmas.  The Burroughs systems programming language on their old medium
systems (2600 and so on) allowed something like this.  As I recall, a
statement could be followed by a colon and some gibberish controlling
its semantics (I believe these were assembly language mnemonics).  I
have seen some Pascal compilers that allowed (or seemed to allow)
control of optimization level at any point in the program, but the
meaning of this was not well-defined.  IBM's PL/I Optimizing compiler
lets you specify down to the external-block level whether you want to
permit the compiler to rearrange statements.

An implementation of C might do this by means of pragmas within
comments.  Would it show up often enough to really be useful?  For
numerical analysts, perhaps....

-- 

D Gary Grady
Duke University Computation Center, Durham, NC  27706
(919) 684-4146
USENET:  {decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary



More information about the Comp.unix.wizards mailing list