Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!fernwood!oracle!news From: pnakada@oracle.com (Paul Nakada) Newsgroups: comp.sys.apple2 Subject: Re: HLLs vs. Assembly Message-ID: Date: 6 Apr 91 06:55:43 GMT References: <1991Mar30.080418.16299@ee.ualberta.ca> <1029@stewart.UUCP> <13345@ucrmath.ucr.edu>, <15732@smoke.brl.mil> Sender: news@oracle.com Organization: Oracle Corporation, Belmont, CA Lines: 40 In-reply-to: jh4o+@andrew.cmu.edu's message of 6 Apr 91 02:41:37 GMT In article jh4o+@andrew.cmu.edu (Jeffrey T. Hutzelman) writes: >gwyn@smoke.brl.mil (Doug Gwyn) writes: >>In article <13345@ucrmath.ucr.edu> rhyde@ucrmath.ucr.edu (randy hyde) writes: >>>X-Window is a good example of what happens when you try to write such code >>>in C. It's wonderful that X is portable, but you need a H**L of a machine >>>run in reasonably well. I'd hate to imagine a PC (<386), Mac, or *egads* >>>an Apple IIgs where the windowing software was written in C. >> >>Again I have to challenge this, using real-world evidence. The bitmap >>graphics interface (including multitasked windows) I'm using while >>typing this has nearly all of its firmware and applications written in >>C, and it uses a processor and clock comparable with low-end Macintosh >>models. Its interactive performance far exceeds that of X11 terminals, >>and also exceeds that of the Macintosh Finder and of Microsoft Windows >>on a 33MHz IBM PC/AT clone. If it had had to have been programmed in >>assembler, I doubt very much that it would ever have been developed. >> >>X11 indeed suffers from several problems, but none of them are due to >>use of C. > >Me too. The machine I'm sitting at (a DECstation 3100) uses a RISC >architecture that no one in his right mind would want to program in >assembly for. The C compiler generates much more efficient code than >any human programmer I know, and I know plenty of decent human >programmers. >-------------------- I think the important thing to realize is not that the compiler generates more efficient code, but that these days, CPU's are designed with compilers in mind. Efficient, with respect to compiler generated code, does not necessarily mean tight, small, and tricky code, but it refers to code that takes the greatest advantages of processor strengths and limits the effects of processor weaknesses. Granted, this is nothing that someone couldn't do directly in assembly, but why do it, when the compiler will do it for you? -Paul Nakada -- Paul Nakada | Oracle Corporation | pnakada@oracle.com