🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1784

Re: Aggressive optimization

#1784
From: Jim Giles
Date: Mon, 22 Oct 1990 21:00
42 lines
2567 bytes
From article <2060@aber-cs.UUCP>, by pcg@aber-cs.UUCP (Piercarlo Grandi):
> [...]
>            the Chase/Giles assumption is that programmers don't know what
> they are doing and still write in a low level language which therefore ought
> to be translated liberally.

On the contrary.  My assumption is that the programmer knows very well
what he's doing and that he shouldn't have to waste that talent on
trivial things that the compiler _should_ know how to do at the present
state of the art.  To be sure, programmers who _don't_ know what they're
doing also benefit from a well written optimizing compiler - so the
language should be aggressively optimized for that reason too.

> [...]
> My argument is that programmers should use the language at the abstraction
> level suitable to them and their applications, and that low level languages
> ought to be translated literally and high level ones liberally, and that
> translating liberally implementations in low level languages is a monstrosity.

I can't find any rigid line between "high level" and "low level"
languages.  No compiler should alter the semantic meaning of a program
as required by the semantic description of the language used.  A lower
level language may give more specific operational requirements in its
definition.  Any feature that is not operationally restricted by the
semantic definition of the language should be freely optimized.

Assembly languages are the only ones I know of in which _no_
operational freedom is granted to the 'compiler'.  Most other
languages (including C - the 'as-if' rule) encourage as much
optimization as possible in their language definitions.  If you
object to this, you should seek to have the specifications of these
languages altered - or write your own language.  In the meantime,
compilers should be allowed - and even expected - to optimize as
aggressively as possible with the semantic definition of the
language.

In any case, the acceptability of an optimization should not be based
on a subjective judgement about the 'level' of the language.  The
semantic description of a language gives the only reliable and
(reasonably) objective standard by which to judge this.

J. Giles
Technical Details
Message-ID: <65592@lanl.gov>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!cs.utexas.edu!yale!cmcl2!lanl!jlg
References: <2060@aber-cs.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!cs.utexas.edu!yale!cmcl2!lanl!jlg
From: jlg@lanl.gov (Jim Giles)
Newsgroups: comp.lang.misc
Subject: Re: Aggressive optimization
Message-ID: <65592@lanl.gov>
Date: 22 Oct 90 21:00:22 GMT
References: <2060@aber-cs.UUCP>
Organization: Los Alamos Natl Lab, Los Alamos, N.M.
Lines: 42