Newsgroups: comp.arch Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Approaches to computer system performance Message-ID: <1988Feb7.185328.11509@utzoo.uucp> Organization: U of Toronto Zoology References: <839@ima.ISC.COM> Date: Sun, 7-Feb-88 18:53:19 EST > Well, the last phrase may make your statement true, but if so, I don't > use many "reasonably modern compilers". I find that with a typical UNIX > C compiler, you can often get a factor of two improvement by going to > assembler. I assume here that your C program is written carefully, but > that you haven't been looking at the generated code to see which constructs > are handled better by your compiler, then making changes that have no > machine-independent motivation. Well, first, if by "a typical UNIX C compiler" you mean something like the typical VAX compilers, you are talking about a ten-year-old compiler that emphasized portability rather than optimization from the start. (Yes, there have been improvements to it since, but not drastic ones.) Modern compilers are a different story. And second, making machine-specific changes to your source is not the same thing as writing in assembler. Someone unfamiliar with the code might not understand why you wrote the code that way, but in C he will still be able to understand what the code is doing. Not so in assembler. -- Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry