Xref: utzoo comp.sys.amiga:28467 comp.sys.amiga.tech:3462 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!ulowell!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: C Compilers Message-ID: <5838@cbmvax.UUCP> Date: 27 Jan 89 19:20:41 GMT References: <496@geocub.UUCP> <30997@vax1.tcd.ie> <7261@batcomputer.tn.cornell.edu> <3342@sugar.uu.net> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 73 In article <3342@sugar.uu.net> karl@sugar.uu.net (Karl Lehenbauer) writes: >With regard to the discussion of which C compiler is better, as Dan Riley >says, it determines on which versions you compare. So true. >A subsequent Lattice release (4.0?) put Lattice back on top, with >better performance. I'm not sure when function prototypes arrived >for Lattice (they haven't yet for Aztec), but they are really good for >catching bugs, and I wish Aztec had them (more on that in a bit.) Function prototypes arrived with 4.0, along with direct library calls (another big win - no more move push params, call stub which pops params and calls rom). >Lattice subsequently came out with their own debugger and made other >improvments in the compiler. They also have come out with C++, although >users on the net haven't been terribly impressed with it in its current >form. I think right now, Lattice is a bit ahead of Aztec, but not >substantially enough for an Aztec 3.6 user to make the jump. 5.0 also includes another VERY important feature: a global optimizer. I beta-tested it, and spent a LOT of time looking at code quality. The optimizer, while not as good as I am (in most cases :-), does a VERY good job. I was astounded at what it did to for (i = 0; i < foo; i++) loops. It also does an excellent job of putting values it will need later into spare registers for temp storage (I thought I had caught it a few times, it turned out it was smarter than I was), and also does a far better job at allocating registers than my register statements do (since it can switch registers between different variables in different sections of a routine). 5.0 also included things formerly in the Lattice Compiler Companion, such as LMK (a good make clone), grep, splat, diff, and an integrated editor, LSE, formerly a seperate product. >I haven't examined the code generated by Lattice, but Aztec's leaves much to >be desired. It's frustrating to see the compiler moving values from a >perfectly useful d-register into another d-register to perform a calculation >on it. Also, it does stuff like dereferencing a chain of pointers >p->q->bar on every reference -- even if it already has the address it needs >sitting in a register. Lattice 3.10 used to do that, 4.02 was somewhat better, but didn't have an optimizer. >I talked to Aztec tech support on the phone recently, though, and they say >that a new version, scheduled for release in March (but it'll probably slip >by months -- they're pretty bad about doing that) which is full ANSI, including >prototypes, and does register tracking and global register allocation, so >it should generate much better code and also spurt Aztec ahead of Lattice >again until the Lattice people come out with their next version. Also lattice seems (in my perhaps biased opinion) to give better support. There is fast response on BIX to problems, plus they run a BBS for registered owners. There have been over 2000 messages in lattice/amiga.c on bix, and they post preliminary versions of patches there when possible. (For example, the 5.01 patches, which will be superceded by the 5.02 that will be mailed to registered owners.) Manx used to be ok (all done by Jim Goodnow, Manx tech support personel rerely used bix), but support seemed to disappear about 6 to 8 months ago. (I hear Jim has been busy, and moved to New Jersey). >It's a good thing there are two C vendors for the Amiga. If there were only >one it's doubtful it'd be as good as the two are, although I do not >think either meets the standards of the cardinal IBM PC C-compilers. Lattice 5.0 is coming pretty close, certainly it's closer to ANSI than most PC compilers, and the optimizer puts it in the league of the large- caliber PC compilers. Disclaimer: I some of the people who worked on 5.0, and I beta tested it. -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup