Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!srs!dan From: dan@srs.UUCP (Dan Kegel) Newsgroups: comp.arch Subject: Re: Approaches to computer system performance Keywords: Algorithms, assembler Message-ID: <578@srs.UUCP> Date: 30 Jan 88 14:14:38 GMT References: <839@ima.ISC.COM> <2158@geac.UUCP> <604@bnr-rsc.UUCP> <180@granite.dec.com> <3081@watcgl.waterloo.edu> Reply-To: dan@rem.UUCP (Dan Kegel) Organization: S.R.Systems Lines: 19 In article <3081@watcgl.waterloo.edu> tbray@watsol.waterloo.edu writes (sorta): > Given a routine which is sucking up a lot of your resources, how much > can you gain by hand-coding in assembler? > Unless you are lucky and have a deep understanding of your machine's > architecture *and* the implementation of that architecture, > probably no more than a few percentage points. > >Algorithms si! Low-level hacking no! >Tim Bray, New OED Project, University of Waterloo Yes... but lots of people are that lucky, and sometimes the payoff is great. I recently rewrote a self-recursive procedure to pass all parameters in registers, yielding a 2x speedup. The resulting code contains about ten asm() statements mixed with about fifty C statements. I almost wish it hadn't worked, though; the code is less readable, and will have to be redone if we move to another machine. -- Dan Kegel srs!dan@cs.rochester.edu dan%srs.uucp@cs.rochester.edu rochester!srs!dan