Xref: utzoo comp.arch:16958 comp.lang.misc:5098 Newsgroups: comp.arch,comp.lang.misc Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Compiler Costs Message-ID: <1990Jul6.161158.1297@zoo.toronto.edu> Organization: U of Toronto Zoology References: <1797@apctrc.UUCP> Date: Fri, 6 Jul 90 16:11:58 GMT 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? It can be negative. Good optimizing compilers can often do a better job on large bodies of code than humans can. Small code fragments often do better when carefully crafted by humans, although this is a very time-consuming activity. Improving the algorithm is usually a more cost-effective way of boosting performance. -- "Either NFS must be scrapped or NFS | Henry Spencer at U of Toronto Zoology must be changed." -John K. Ousterhout | henry@zoo.toronto.edu utzoo!henry