Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!vd09+ From: vd09+@andrew.cmu.edu (Vincent M. Del Vecchio) Newsgroups: comp.sys.mac.misc Subject: Re: Not another NeXT defector???!!! Message-ID: Date: 5 Nov 90 20:22:20 GMT References: <2909@unccvax.uncc.edu> <90308.005234KJSTEELE@MTUS5.BITNET> , <1990Nov5.095930.27753@cs.umu.se> Organization: Carnegie Mellon, Pittsburgh, PA Lines: 34 In-Reply-To: <1990Nov5.095930.27753@cs.umu.se> > Excerpts from netnews.comp.sys.mac.misc: 5-Nov-90 Re: Not another NeXT > defect.. Michael Forselius@cs.umu (798) > And remember that no compiler NEVER generates code as efficient as > hand-optimized assembler. Yeah, that's about right. Every compiler always generates code as efficient as hand-optimized assembler at least some of the time (translating your double negative as best I can). In fact, you could be even stronger than that. A really good compiler will generate code as good as or sometimes better than hand-optimized assembler most of the time. Compilers have gotten MUCH better in recent years, with the advent of RISC machines, on which compilers are much more important. Taking MIPS' C compiler for example, not only will it optimize as well as or better than you will (and it can take into account in performing these optimizations knowledge of the processor that the compiler writers had that you don't--these things are important!), but there is so much code and it is already well-enough optimized that it is not worth your time to do the hand-optimization. Admittedly, Mac compilers are nowhere near this level of quality, but your statement was, if not wrong, certainly off the mark. The best, most general way to write an operating system, IMHO, if you have the time/money, is to find/write a good compiler for a high level language, and write the OS in that language. The most important things that you gain are a level of ease of coding and portability (88000, perhaps?). You don't lose much. Again, Apple's compiler probably isn't good enough that it couldn't benefit from hand optimization, but I'm not going to knock them for writing the OS in C++ because they don't have a decent C compiler I'm just going to knock them for not having a better C compiler.... -Vince