Newsgroups: alt.folklore.computers,comp.unix.misc
Subject: Re: The need for an assembler (was: Favorite CPU)
From: scott@yarc.uucp (Scott Beckstead)
Date: Tue, 08 Sep 1992 18:14:29 GMT
Reply-To: scott@yarc.UUCP (Scott Beckstead)
Organization: Yarc Systems

In article <1992Sep8.121111.9781@klaava.Helsinki.FI> torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) writes:
>Could we /please/ stop this flaming - it was mildly interesting about a
>thousand posts ago, but the examples have gotten worse and it's not
>leading anywhere.  cjl is obviously not going to admit hll's have any
>merits, and most others (including me) think using assembly for anything
>bigger than a couple of hundred lines is usually a waste of time (but
>there are admittedly exceptions).  This flame-fest has gone on for long
>enough, and yes, I know how to use kill-files, but no, I don't like
>them, and would rather see this thread moved to misc.test with possibly
>interesting posts being posted here as well. 
>
>Assembly is good mostly for device drivers and /really/ speed-critical
>applications that can take advantage of quirks of the machine.  For
>those purposes it's essential: but even then it's often possible to
>embed it by using inline assembly or just a small routine that gets
>called from a hll.  I consider myself fluent in assembly (68k and 386,
>my 6502 is a bit rusty), and I have to admit that a good C compiler
>(gcc) often gets the job done a hell of a lot faster, and the resulting
>assembly is often better than I'd care to program.  Admittedly I usually
>use constructs that I know translate well into asm (including goto's),
>and I sometimes check the result of the compilation by reading the
>assembler result.  But 99% of the time I'm quite happy to let the C
>compiler take care of some tedium for me. 
>
>Letting the compiler worry about most things gives me (a) more time to
>get the job done and (b) lets me concentrate on the /important/ parts of
>a program.  Even if the resultant code was much worse than what I could
>write by hand, that's often reason enough to use a compiler (be it
>pascal (ughh), C or Ada or whatever).  Even interpreted languages are
>often fast enough to get the work done.  But when a compiler arguably
>results in as good code as writing it by hand, the choice is pretty
>obvious.  Yes, I can probably beat gcc on any given reasonable function,
>but sheer boredom would probably result in worse code on average in a
>bigger project. 
>
>On the other hand, I use assembly (mostly in the form of inline macros)
>just because some things simply /require/ them.  And believe me, there
>are a lot of things that do - my current hack is an operating system,
>and I use a inline assembly all over the place: usually hidden in macros
>or inline functions, but they are there.  Other things (special number
>formats like fixed precision or multiple-precision math) are also often
>most easily coded in assembly for good performance.  So could you
>*please* shut up, shake hands, and admit everybody is wrong (*). 
>
>		Linus
>
>(*)  And flame me as much as you like, I couldn't care less.  But do it
>by mail, so that it gets lost in all the other mail I get. 

Sorry have to agree here.  Will stop poste haste.  Shucks it was getting fun.

-- 
Reply to: scott@yarc.uucp 	|  
				|	Spin my nipple nuts and send me to   
  Smoke me a kipper, I'll be	| 	Alaska.
   back for breakfast	 	|       
Newsgroups: alt.folklore.computers