Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!bionet!ucselx!crash!pro-mansion.cts.com!psonnek From: psonnek@pro-mansion.cts.com (Patrick Sonnek) Newsgroups: comp.sys.apple2 Subject: Re: HLLs vs. Assembly (was Re: IIgs Unzip thing) Message-ID: <8993@crash.cts.com> Date: 3 May 91 15:56:14 GMT Sender: bblue@crash.cts.com Lines: 41 In-Reply-To: message from reanor@speedy.cs.pitt.edu >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. Have you ever heard of macros? Most good assemblers, even Apples Pro-Dos Assembler tools supports macros. Alot of assmblers for mainframes come with a whole truck load of memory and register management macros. (As well as I/O, program initialisation, system inqiry.) Granted, the Apple does this entirely with Calls to the MLI, but those are almost as easy to use as macros. About the Redundant load/stores, I've noticed many compilers do the exact opposite, the resulting code is full of unnessesary loads/stores. in assembler you would code direct memory access, which is many times faster, providing that what it is your accessing is within your immediate memory page. ---- ProLine: psonnek@pro-mansion Sysop Pro-mansion: 507/726-6181 Internet: psonnek@pro-mansion.cts.com MCImail: psonnek UUCP: crash!pro-mansion!psonnek ARPA: crash!pro-mansion!psonnek@nosc.mil BITNET: psonnek%pro-mansion.cts.com@nosc.mil <> <>