Newsgroups: comp.arch Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: using (ugh! yetch!) assembler Message-ID: <1988Jul26.144359.5267@utzoo.uucp> Organization: U of Toronto Zoology References: <6341@bloom-beacon.MIT.EDU> <60859@sun.uucp> <474@m3.mfci.UUCP> <2926@utastro.UUCP> <37014@linus.UUCP> Date: Tue, 26 Jul 88 14:43:59 GMT In article <37014@linus.UUCP> munck@faron.UUCP (Robert Munck) writes: >...(Done as a military procurment, the Ada version would >take 100 people ten years to do; the assembly version would be quietly >cancelled in the fifteenth year of development). Done as a commercial job in C, of course, two people could do it in a year! :-) :-) >Sure, sometimes the timing requirements are so tight that the HOL version >doesn't make it. In that case, instrument the heck out of the HOL, find >out which ten statements it's spending 30% of the time executing, and >re-write those in assembler. Keep doing this until you meet the timing >specs. Almost certainly, you'll have re-written less than 5% of the code. An alternative strategy is to re-think the HOL code instead. Doing this repeatedly yields remarkable results. It's remarkable how little thought goes into the first version of most code, even when good people are doing it. C News (see the Collyer&Spencer paper in the Winter 87 Usenix) picked up an order of magnitude in performance this way without a line of assembler. Of course, we profiled it to find out which parts of it actually deserved all this attention; lengthy re-thinking of non-critical code is a silly waste of effort. -- MSDOS is not dead, it just | Henry Spencer at U of Toronto Zoology smells that way. | uunet!mnetor!utzoo!henry henry@zoo.toronto.edu