Xref: utzoo comp.lang.c:30021 comp.lang.prolog:2892 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!uc!nic.MR.NET!nic.stolaf.edu!news From: hannum@haydn.psu.edu (Charles Hannum) Newsgroups: comp.lang.c,comp.lang.prolog Subject: Re: A Faster Language? (Was Re: Prolog is "faster" than C) Message-ID: <1990Jul1.052501.18324@acc.stolaf.edu> Date: 1 Jul 90 05:25:01 GMT References: <1990Jun16.005152.26240@agate.berkeley.edu> <2134@polari.UUCP> Sender: news@acc.stolaf.edu Distribution: usa Organization: The Pennsylvania State University Public NeXT Laboratory Lines: 50 In-Reply-To: 6sigma2@polari.UUCP's message of 26 Jun 90 06:11:34 GMT In article <2134@polari.UUCP> 6sigma2@polari.UUCP (Brian Matthews) writes: Of course. I think there would be little argument that for any application, the optimal speed of that application will be achieved by carefully hand coding it in assembly language. But how much production software is written in assembly language these days? No, definitely not much argument about the point. But to answer your question, there is a CAD program for the PC called FastCAD that's written in 8086 assembly language, and I'm told (though I don't know positively) that the entire VM/CMS operating system (which sucks, but that's beside the point) that IBM uses on their mainframes is written in /370 assembler. I don't know how much other software is written in assembly language, but obviously somebody has an interest in speed ... Anyway, the way /370 assembly language is coded, it's fairly easy to write modular, working programs, which I can't say for any other assembly language I've ever written (including 80([123]?8[67]|48|[35]1), 6809, 6502, and VAX, just in case you're wondering). (BTW: I group the Intel chips in one regular expression because I feel they're all on the same level ... B-I) If all assembly language was as clean as /370, you would probably see a lot more production code written in assembler. (This is not to say that /370 is perfect and doesn't have problems.) But to treat your point seriously, yes, I presonally have written production code in assembly language, mostly for the PC, because compiled C code has a tremendous amount of extra code (read: library routines) added to it, and is, as mentioned, slower than the assembly language version. On Unix machines, I don't worry so much about size, but speed is always a consideration. On another note: I've found that, with a good optimizing compiler like gcc, on the whole the assembly/C speed difference is overall much less than the difference one gains by finding a better algorithm. I could go into some horrible details and statistics from my own experience to demonstrate this, but I'll spare you. It's not worth the effort it would take to dig up all the information... -- Virtually, Charles Martin Hannum "Those who say a thing cannot be done should Please send mail to: under no circumstances stand in the way of hannum@schubert.psu.edu he who is doing it." - a misquote