Xref: utzoo comp.sys.amiga:28288 comp.sys.amiga.tech:3392 Path: utzoo!attcan!uunet!husc6!mailrus!cornell!batcomputer!riley From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: C Compilers Message-ID: <7261@batcomputer.tn.cornell.edu> Date: 24 Jan 89 21:08:45 GMT References: <496@geocub.UUCP> <30997@vax1.tcd.ie> Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 71 In article <30997@vax1.tcd.ie> rwallace@vax1.tcd.ie writes: >In article <496@geocub.UUCP>, olva@geocub.UUCP (Olivier Vayssettes ) writes: >> Comparative inquiry between MANX & LATTICE C compilers. >> >> I am going to write a large C and assembly program for Amiga. >> I have been told about possibilities of LATTICE 5.0 and MANX 3.6 (I think >> 3.6 is the most recent one). If you have already used these compilers >> (even only one of them), could you tell me your opinion about their >> advantages and drawbacks, so that I could choose between them? >I have used both compilers and I personally find Manx C vastly superior. >The compiler itself is much faster. It's also much more compact which means >it'll fit in RAM disk on my 1-meg Amiga whereas Lattice C has to be loaded in >from floppy if I'm working on a big project which slows things down a lot more. >The precompiled header files are much better than Lattice C's "compact" >versions of the files which have to be recompiled every time. The developer >and commercial versions come with a number of incredibly useful utilities >like GREP and MAKE. The only advantage of Lattice C is its support for >function prototypes, which is only one small advantage set against the many >major disadvantages. Manx 3.6 also has the source-level debugger. When you make this sort of comparative posting, could you please specify the versions you're basing your comparisons on? You're out of date in several respects, which would have been obvious if you had said what version of Lattice you're basing your opinions on. (Note that the request explicitly asked about Lattice 5.0.) Manx is smaller, and fits more comfortably on un-expanded Amigas. Manx is also probably still faster comiling. On the other hand, Lattice C 5.0 has precompiled header support as well as the "compact" headers. The standard version comes with grep, lmk (make), lse (an editor), a profiler, source level sybolic debugger, cross reference tool, optimizer, assembler, and a handful of other tools. Lattice, besides having function prototypes, also is much closer to ANSI compatibility. It has extensions for mixing memory models in the same source file, forcing data to be loaded into chip or fast ram, specifying what registers arguments should be put in (for calling assembly, or perhaps for writing non-time-critical interrupt handlers or libraries in C). It has startup modules for creating resident programs, and startups which will catch most gurus and other exceptions and dump a traceback before exiting cleanly. Lattice also does some "lint-like" checks for bad parameters (using the function prototypes), mis-matched assignments, conflicting declarations, and more, which some people hate, but which I would hate to program without. >With regard to code produced, even using 16-bit integers, stack-checking >disabled, every option chosen to make the code as efficient as possible, >Manx C always produces programs that are much more compact, and usually >faster as well. The link overhead for Manx is lower and examination of >assembly listings shows that Manx produces better code in most ways. I don't think this is true anymore. Lattice 5.0, especially with the optimizer enabled, produces quite good code. Executable size is competitive with Manx, even without using a lot of tricks. And linking is much faster now that Lattice has added indexing to the library format. In general, I think Lattice and Manx are much closer than you think. I highly recommend Lattice if you are willing to give up some compile speed in return for type checking, function prototypes, and ANSI compatibility. Manx, on the other hand, compiles faster, and the compiler is smaller. Speed and size of the final code just isn't that different anymore, and Lattice probably has the edge in speed...at least for now. >Russell Wallace, Trinity College, Dublin >rwallace@vax1.tcd.ie -Dan Riley (dsr@lns61.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Lab, Cornell U.