Path: utzoo!attcan!uunet!husc6!cmcl2!lanl!lambda!jlg From: jlg@lambda.UUCP (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: 'register' variables and other goodies (was Re: Common subexpression optimization) Message-ID: <14240@lambda.UUCP> Date: 14 Feb 90 00:21:44 GMT References: Lines: 27 From article , by pcg@rupert.cs.aber.ac.uk (Piercarlo Grandi): > [...] > to the vast effort expended on what by comparison is an unsafe, > inefficient shortcut, "optimizers", [...] You keep saying that. However, you have yet to prove (or even make a good case) that optimizers are either unsafe or inefficient. To be sure, I have no absolute objection to 'hints' that help the compiler do a better job. BUT - the compiler should be expected to do a reasonably good job in the absence of such 'hints'. Furthermore, a compiler with a good optimizer should be expected to do _better_ than a simple compiler even on the 'hint' filled code! After all, the _PURPOSE_ of a compiler is to translate from source code to semantically equivalent machine code. Unfortunately, there are an infinite number of semantically equivalent translations!!! Optimization is a word for several compiler techniques of selecting one of these translations which is - at least - reasonably efficient. In fact, in order to use the _programmer's_ time most effectively, the compiler writer should get the compiler to produce the most efficient code he can. (By the way, I DO have an objection to the 'uglifying hints' that C makes available. It seems to me that conveying such information to the compiler shouldn't require destroying the natural flow of the source code.) J. Giles