Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!speedy.cs.pitt.edu!reanor From: reanor@speedy.cs.pitt.edu (Jeffrey Getzin) Newsgroups: comp.sys.apple2 Subject: Re: HLLs vs. Assembly (was Re: IIgs Unzip thing) Keywords: C, Compiler, Assembly Language Message-ID: <10505@pitt.UUCP> Date: 26 Apr 91 16:14:16 GMT References: <9104041653.AB15986@apple.com> Sender: news@cs.pitt.edu Reply-To: reanor@speedy.cs.pitt.edu.UUCP (Jeffrey Getzin) Organization: Univ. of Pittsburgh Computer Science Lines: 43 In article <9104041653.AB15986@apple.com> JWANKERL@UTCVM.BITNET ("Josef W. Wankerl") writes: > >ACK!!!! "Easy" is a relative term. I could probably code something >much faster in C, but I could do a much better job in assembly (on the >IIGS, other architectures may vary.) Saying it's easier in C than >assembly - well - the concepts are all the same, I can implement a >linked list and queues and binary trees and all sorts of other nifty >constructs with assembly, and I have lots more flexibility with my >assembly constructs, too. ...and sometimes the easy way out isn't >always the best way. > >-- >===> Josef W. Wankerl, Technical Editor for GS+ Magazine > BITNET: JWANKERL@UTCVM.BITNET | America Online: JWankerl > ProLine: jwankerl@pro-gsplus |-------------------------------- >Internet: jwankerl@pro-gsplus.cts.com | "I am a Viking" -Y. Malmsteen I think you people have been arguing with only tiny computers (such as the Apple II's) in mind. On these machines, the limitation is in the compiler and not in the language. On a larger machine, I don't see how it's even REMOTELY possible to out-do a compiled high-level language. Compilers can do automatically what is inconceivably hard, boring, or distasteful to a programmer. For example, I recently read an article, "Program Optimization for Instruction Caches" (McFarling/Stanford University) in which compiled programs are optimized to minimize the miss rate on an instruction cache by rearranging the basic blocks. I don't know about you net-ers, but I personally would not want to do this to assembler language programs by hand. Personally, I don't know if even I COULD, and I feel that I am a more than an adequate programmer. The same argument goes for such things as register allocation (minimize memory access), redundant load/store elimination (again minimizing memory access), constant propogation (reducing number of computations performed), invariant code motion (reducing number of instructions executed), etc. All of these optimizations are very easy conceptually, but are simply beyond the boredom-thresholds of most programmers. -- --- Jeffrey Getzin saintdor@vms.cis.pitt.edu