Path: utzoo!attcan!uunet!samsung!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!latcs1!stephens From: stephens@latcs1.oz.au (Philip J Stephens) Newsgroups: comp.sys.apple2 Subject: Re: languages used with commercial software Message-ID: <7509@latcs1.oz.au> Date: 26 Mar 90 11:51:29 GMT References: <9003232001.AA00592@apple.com> <12423@smoke.BRL.MIL> <7494@latcs1.oz. <1990Mar25.210033.14719@world.std.com> Organization: Comp Sci, La Trobe Uni, Australia Lines: 35 In article <1990Mar25.210033.14719@world.std.com>, spike@world.std.com (Joe Ilacqua) writes: > In article <14615@fs2.NISC.SRI.COM> cwilson@NISC.SRI.COM (Chan Wilson) writes: > < (4) Coding in assembly is _always_ faster. > > Now if we are talking 'assembly on Apple{//,][}s' then I might > agree with you. But in general modern compilers are fast, and some > even product faster code. A compiler is able to view to hole program > a once and can often make much more far reaching optimizations than > most programers. This is rather doubtful. Most compiler optimisation concentrates on assigning registers for calculations, and removing all of the unnecessary and duplicate assembly instructions. Overall global optimisation is _extremely_ difficult to achieve, and compilers that perform such optimisation tend to be somewhat buggy. Compilers don't view the whole program at once. Optimisation tends to be local rather than global, since in order to achieve higher levels of optimisation the compiler must _know_ what the program is doing. It seems to me that most programmers ought to be write better code than a compiler; generally assembly programmers tend to write very wieldy code simply because it takes less effort! Look at any 6502 program in Nibble and you'll see what I mean. Modern compilers on an Apple cannot hope to produce faster code than pure assembly. Compilers on minicomputers is a different story, since the machine is damn fast anyhow, and nobody wants to write in assembly language on a UNIX machine (let's face it, C is bad enough :-) I doubt whether a high-level language compiler can be written for an Apple that generates code that is faster than assembly language. < Philip J. Stephens >< "Many views yield the truth." > < Hons. student, Computer Science >< "Therefore, be not alone." > < La Trobe University, Melbourne >< - Prime Song of the viggies > <\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/>