home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!kip-28.taligent.com!user
- From: keith@taligent.com (Keith Rollin)
- Subject: Re: what is the best C compiler
- Message-ID: <keith-221292125608@kip-28.taligent.com>
- Followup-To: comp.sys.mac.programmer
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Organization: Taligent
- References: <PA-151292184926@macmartineau.ccr.hydro.qc.ca> <1992Dec16.162318.4371@news2.cis.umn.edu> <1992Dec19.165625.2597@ll.mit.edu> <bauer-221292105134@134.60.68.23>
- Date: Tue, 22 Dec 1992 21:04:58 GMT
- Lines: 29
-
- In article <bauer-221292105134@134.60.68.23>, bauer@informatik.uni-ulm.de
- (Christian Bauer) wrote:
- >
- > GNU C compiler for MPW version1.37 has the fastest and tightest code I have
- > seen.
-
- As always when benchmarking, it really depends on the source code you feed
- it. I once compiled the same source with THINK C, MPW C, and GNU C. The
- results were that THINK C was about 10% better than MPW C, and MPW C was
- about 10% better than GNU C. THINK won out because it used 2 byte ints. GNU
- C lost a lot of ground because it was unable to convert normal branches
- into short branches when appropriate. I wrote a little post processor for
- the assembly produced by GNU C to convert them into short branches. Only
- then did GNU C's object size come in line with THINK C.
-
- GNU C also loses it when dealing with Points. It tries to be smart by
- realizing that a Point can fit into a 32-bit register. However, it trips
- over itself in doing so, and generates some really ugly code for masking
- out the upper and lower parts of the register when mucking with a single
- coordinate at a time.
-
- Otherwise, GNU C's code generation is top notch. But THINK C's code is just
- as good, THINK C is miles faster, the environment is really nice, and THINK
- C supports the latest MPW headers.
-
- -----
- Keith Rollin
- Phantom Programmer
- Taligent, Inc.
-