Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!idis!mi-cec!dvk From: dvk@mi-cec.UUCP (Dan Klein) Newsgroups: net.lang.c Subject: Re: C "optimization" (6 of 8) Message-ID: <211@mi-cec.UUCP> Date: Sun, 19-Feb-84 15:35:01 EST Article-I.D.: mi-cec.211 Posted: Sun Feb 19 15:35:01 1984 Date-Received: Tue, 21-Feb-84 08:48:19 EST Lines: 17 A response to Morris Keesan: Having a compiler discard instructions that are superflous is not a "fatuous" desire. If you go ahead and count the number of instructions that are required to supress a ".data" / ".text" pair (probably on the order of 10 instructions), and the amount of code required to write the things out, go through system buffers, get written out to the disk, read back again by the next pass, moved back though the buffers, scanned, checked in lookup tables, evaluated, (ignored), and then add in the (minimum) 5 or 6 context swaps, you begin to see that removing the instructions is **FAR** cheaper than writing them out. Not only that, but if I/O is blocked, the process is eligible to be swapped out, which slows you down even more. No, the example was not fatuous. Try running on a system with a load of 20 (it happens a *lot* on cmucsg), and you tell me which approach wins. -Dan Klein, Mellon Institute, Pittsburgh