Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!rex!lang From: lang@rex.cs.tulane.edu (Raymond Lang) Newsgroups: comp.sys.apple2 Subject: Re: Re- HLLs vs. Assembly Message-ID: <7007@rex.cs.tulane.edu> Date: 13 Apr 91 00:27:59 GMT References: <9104060651.AA18946@apple.com> <1991Apr6.100927.21953@nntp-server.caltech.edu> <1991Apr9.150402.563@latcs2.lat.oz.au> <15782@smoke.brl.mil> <6965@rex.cs.tulane.edu> <1991Apr10.203703.21010@nntp-server.caltech.edu> Organization: C.S. Dept, Tulane Univ., New Orleans, LA Lines: 50 In <1991Apr10.203703.21010@nntp-server.caltech.edu> toddpw@nntp-server.caltech.edu (Todd P. Whitesel) writes: >Yes, but modifying the program to improve performance requires > (a) better overall algorithms &/or data structures > (b) knowledge about the hardware and what the compiler will produce I don't follow how (a) comes from experience in assembly language. >[convex example deleted] >The point of all this is that while HLL's insulate you from the grunge, they >often make it hard to obtain optimal performance. The set of fully portable >modifications that yield pure improvement on any machine is very small >compared to the set of modifications you can make when you have some >knowledge of the machine hardware and how the compiler will react to the >program (including the various optimizer switches you can invoke). I've had some _very_ limited experience with the Convex here at Tulane, and you're right: you have to write the code a certain way in order for the vectorizer to be able to do much with it. Also, your point about I/O was well taken. However, as I've been following this discussion over the past couple of weeks (and I've found it very interesting), I've sensed an overriding concern for efficiency. While that's probably understandable in a newsgroup dealing with a 2.8 Mhz home computer, I believe many times other factors tip the scales against programming in assembly. For example, I'm sure that with the revolving door mentality many people have about jobs, a lot of software development houses put a premium on well modularized code with clean interfaces that is easy to modify even by someone who didn't write it. I don't deny this is possible in assembly, but I'd certainly say this is easier to achieve in principle with an HLL. >Writing portable code that compiles well on your machine is generally the >best way to go; only when performance or coding time is more important than >portability should assembly be used Seems to me an HLL would be better when coding time is limited. I would say it a little stronger: only when performance is more important than _every_other_consideration_ should assembly be used. Knowledge of assembly is certainly useful, which I'm sure is why it's part of almost all computer science curriculums. But frankly, I think there are a lot of considerations that make it an inappropriate choice for most projects. Ray lang@rex.cs.tulane.edu