Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ecsvax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!ecsvax!dgary From: dgary@ecsvax.UUCP (D Gary Grady) Newsgroups: net.unix-wizards,net.lang Subject: Re: Optimization and language level Message-ID: <402@ecsvax.UUCP> Date: Fri, 21-Dec-84 10:06:15 EST Article-I.D.: ecsvax.402 Posted: Fri Dec 21 10:06:15 1984 Date-Received: Sun, 23-Dec-84 00:55:14 EST References: <227@harvard.ARPA> Organization: Duke U Comp Ctr Lines: 26 Xref: watmath net.unix-wizards:11190 net.lang:1163 <> 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