Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: Lemmings - a tutorial Part V (last) Message-ID: <20435@cbmvax.commodore.com> Date: 7 Apr 91 05:28:03 GMT References: <1991Mar31.003933.1483@mintaka.lcs.mit.edu> <1991Apr1.020748.26863@mintaka.lcs.mit.edu> <1974.tnews@templar.actr Organization: Commodore, West Chester, PA Lines: 37 ix.gen.nz> Sender: Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Followup-To: Distribution: Organization: Commodore, West Chester, PA Keywords: In article <1974.tnews@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes: >> Why hasn't someone made the entire c.lib into a loadable library > > Some of the routines do exist in the OS somewhere. Most people > can't be bothered using them. Not really (i.e. they're not exact replacements of ANSI/Unix routines, and they're only available under 2.0). They are handy for someone trying to write very small programs (like all the C: commands) who doesn't want to pull in library routines, and for Asm programmers. > I read somewhere that SAS C (what I use) does these optimizations > for powers of 2, so I tend to leave such things alone unless I > want to be sure that they are happening, or the value is not > a power of 2. It does rather more than that. It optimizes for a number of specific multiplies (not just powers of two), and in some cases divides (you have to be careful with signed arithmetic to get the same value - unsigned is easy for powers of 2.) -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup Disclaimer: Nothing I say is anything other than my personal opinion. Thus spake the Master Ninjei: "To program a million-line operating system is easy, to change a man's temperament is more difficult." (From "The Zen of Programming") ;-)