🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1307

Re: Compiler Costs

#1307
From: Steve S. Roy
Date: Sat, 07 Jul 1990 01:27
32 lines
2118 bytes
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?


It depends A LOT on the processor involved, the particular memory
system, the i/o and so on.

Much of the point of the whole RISC thing is to make it easier for
compilers to get a reasonable fraction of the speed of a hand compiled
code fragment.  I'm told that the MIPS compiler generates code that is
nearly as good as a human would write, and this is largely due to the
fact that the assembly language is tuned for the compiler.

To illustrate the opposite end of the spectrum, I've been working on
writing high speed codes for the i860 recently, and current compiler
technology is VERY FAR from equaling hand coding on that style of
processor.  There are a couple of reasons for this, but they come down
to the need for large scale restructuring (strip mining and other
cache handling things), dealing with a fairly small register set, and
a plethora of pipelines (read from memory, write to memory, multiply,
add), and a couple of instructions that have been left out.  The end
result is that there is often a SPEEDUP FACTOR OF 10 OR MORE to be
gained for compute intensive applications with intelegent hand coding.

Steve
Technical Details
Message-ID: <1067@idunno.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!njin!princeton!taylor!ssr
References: <1797@apctrc.UUCP> <2317@l.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!njin!princeton!taylor!ssr
From: ssr@taylor.Princeton.EDU (Steve S. Roy)
Newsgroups: comp.lang.misc
Subject: Re: Compiler Costs
Message-ID: <1067@idunno.Princeton.EDU>
Date: 7 Jul 90 01:27:47 GMT
References: <1797@apctrc.UUCP> <2317@l.cc.purdue.edu>
Sender: news@idunno.Princeton.EDU
Reply-To: ssr@taylor.Princeton.EDU (Steve S. Roy)
Organization: Princeton University
Lines: 32