Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!sgi!karsh@trifolium.esd.sgi.com From: karsh@trifolium.esd.sgi.com (Bruce Karsh) Newsgroups: comp.arch Subject: Re: Compiler Costs Message-ID: <64045@sgi.sgi.com> Date: 13 Jul 90 06:15:36 GMT References: <40052@mips.mips.COM> <628@dg.dg.com> Sender: karsh@trifolium.esd.sgi.com Reply-To: karsh@trifolium.sgi.com (Bruce Karsh) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 21 In article <628@dg.dg.com> publius@dg-pag.webo.dg.com (Publius) writes: >Many "large" programs spend most of the CPU time in one or a few relatively >"tiny" routines. This is an often stated. Is there any evidence for this? What does the distribution of time look like for, for instance, a compiler? I'd expect that there would be lots of time-sinks. The lexical analyzer, the symbol table hash routine, the symbol table lookup routine, common subexpression finder, ... etc, could all be candidate time-sinks. How about a text editor? I could think of a few dozen potential time-sinks in a text editor. When I've profiled programs, I've often found that the time is spent mostly in a few routines, but this isn't always the case. How often is it true that nearly all of the time is spent in only a few routines? How often are these routines tiny? Bruce Karsh karsh@sgi.com