Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!barmar From: barmar@mit-eddie.UUCP (Barry Margolin) Newsgroups: net.lang.c Subject: Optimizing (orig: Re: Lisp to C conversion) Message-ID: <668@mit-eddie.UUCP> Date: Sun, 8-Dec-85 15:03:10 EST Article-I.D.: mit-eddi.668 Posted: Sun Dec 8 15:03:10 1985 Date-Received: Mon, 9-Dec-85 04:16:47 EST References: <391@bcsaic.UUCP> <10200028@ada-uts.UUCP> <628@ttrdc.UUCP> Reply-To: barmar@mit-eddie.UUCP (Barry Margolin) Organization: MIT, Cambridge, MA Lines: 21 In article <628@ttrdc.UUCP> levy@ttrdc.UUCP (Daniel R. Levy) writes: >In article <10200028@ada-uts.UUCP>, richw@ada-uts.UUCP writes: >>That is, you tell the compiler to optimize your pi-calculating program >>and it spews out "3.14159..." >That would be a marvel of "artificial intelligence" -- an optimizer that >can recognize algorithms. Since when is an INTERPRETER considered a "marvel of artificial intelligence"? The original didn't say anything about the optimizer recognizing algorithms. It merely described an extended form of constant folding. A program that doesn't take any input always generates the same answer, so it can be treated as a constant. This reminds me of the old story of the optimizing Fortran compiler that noticed that the program didn't have any output statementsm, so it generated an object program that didn't bother performing the computation! -- Barry Margolin ARPA: barmar@MIT-Multics UUCP: ..!genrad!mit-eddie!barmar