Xref: utzoo comp.arch:16964 comp.lang.misc:5099 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!utgpu!cunews!bcars8!bnrgate!bigsur!bnr-rsc!bcarh185!schow From: schow@bcarh185.bnr.ca (Stanley T.H. Chow) Newsgroups: comp.arch,comp.lang.misc Subject: Re: Compiler Costs Message-ID: <3229@bnr-rsc.UUCP> Date: 6 Jul 90 14:14:15 GMT References: <1797@apctrc.UUCP> Sender: news@bnr-rsc.UUCP Reply-To: bcarh185!schow@bnr-rsc.UUCP (Stanley T.H. Chow) Organization: BNR Ottawa, Canada Lines: 46 Summary: Followup-To: Keywords: In article <1797@apctrc.UUCP> zrra07@backus (Randall R. Appleton) writes: >I have a simple question: Does anyone know what sort of speed-up >on gets by going from a good implementation of some algorithm in a >third generation language (C, Fortran) and a good optimizing compiler >to hand-coded assembly? > >In other words, if I take my average well written program, compiled >with a good optimizing compiler, and re-write it in assembler, what sort >of speedup should I expect to see? > >Thanks, >Randy The short answer is: Depends. OKay, you ask, on what does it depend? Well, it depends on just about every single adjective you used in your question: How good is "a good implementation"? Which algoritm is the "some algorithm"? Which "good optimizing compiler"? Whose average? Over which set of programs? "Well written" for what purpose? Who will do the rewriting? For which computer? Basically, performance is like anything else, the variation between people (using identical tools) is larger than variation between tools. So the "optimum" stratagy is to get the best person for the job. You really will have to specify more details to get any meaningful answer to your question. For example, There are some Fortran compilers that are extremely good; for many programs, the code is just about optimal. The meaning of "well written" is very context dependent. Some people insist on clear, understandable code; others want it fast, still others want it to be robust and bullet-proof. Which properties does your program have and which properties do you want to preserve in assembler? -- Stanley Chow BitNet: schow@BNR.CA BNR UUCP: ..!psuvax1!BNR.CA.bitnet!schow (613) 763-2831 ..!utgpu!bnr-vpa!bnr-rsc!schow%bcarh185 Me? Represent other people? Don't make them laugh so hard.