Xref: utzoo comp.arch:17058 comp.lang.misc:5142 Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!ucsd!pacbell.com!pacbell!att!mcdchg!laidbak!obdient!igloo!nevin From: nevin@igloo.scum.com (Nevin Liber) Newsgroups: comp.arch,comp.lang.misc Subject: Re: Compiler Costs Message-ID: <2617@igloo.scum.com> Date: 11 Jul 90 07:13:00 GMT References: <1797@apctrc.UUCP> <1565@uvm-gen.UUCP> <1990Jul8.183551.13891@nlm.nih.gov> Reply-To: nevin@igloo.scum.com (Nevin Liber) Followup-To: comp.lang.misc Organization: Igloo public access unix, Northbrook IL Lines: 29 [followups to comp.lang.misc only, please] In article <1990Jul8.183551.13891@nlm.nih.gov> states@tech.NLM.NIH.GOV (David States) writes: >On a RISC machine with a good compiler, a C programmer willing to work >on his code ought to be able to do almost anything hand coded assembler can. >This may involve looking at assembly output, recoding routines a few times >and testing alternative alogorithms, but in the end you still have C (that >will run on another processor even if not as fast). Bleech!! (This is not intended as a flame; it is just my humble opinion.) If you are going to go to all that bother, you are better off writing that portion of your code directly in assembler. There are two ways of programming in C: (1) writing high-level portable code (2) using it as a macro-assembler Unfortunately, it is darn near impossible to write code which satisfies both of these goals! And from a maintenance standpoint, assembler itself is better than C for goal #2. For one thing, it separates the code which needs to be redone during a port. For another, it always does what you expect it to do, even when you change versions of the compiler. -- NEVIN ":-)" LIBER nevin@igloo.scum.com or ..!gargoyle!igloo!nevin (708) 831-FLYS Advertisement: Hire me!