home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers
- Path: sparky!uunet!news.gtech.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!yale.edu!jvnc.net!newsserver.jvnc.net!darwin.sura.net!bogus.sura.net!howland.reston.ans.net!sol.ctr.columbia.edu!eff!world!iecc!compilers-sender
- From: Michael John Haertel <mike@skinner.cs.uoregon.edu>
- Subject: Gcc, Lcc, and 2c
- Reply-To: Michael John Haertel <mike@skinner.cs.uoregon.edu>
- Organization: Compilers Central
- Date: Thu, 7 Jan 1993 01:30:46 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <93-01-025@comp.compilers>
- Keywords: optimize
- References: <93-01-020@comp.compilers> <93-01-017@comp.compilers>
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 34
-
- The moderator wrote:
-
- >[It varies all over the place. The Princeton/Bell Labs lcc compiler
- >is supposed to produce better code faster than GCC. Ken Thompson's Plan 9
- >compiler is supposed to be better still in both dimensions. -John]
-
- This isn't true. My experience was that Gcc produces faster code than
- Lcc. Methodology: Compile both compilers with themselves and each other.
- Time the amount of time both compilers take. I found that the
- lcc-compiled compilers typically ran 5-10% slower than the gcc-compiled
- compilers. I suspect that any published comparisons that show Lcc
- producing faster code are either based on not using -O with gcc, or or
- used a poorly tuned port of gcc.
-
- I was not able to compare 2c directly with gcc, since gcc had not been
- ported to Plan 9, but again I suspect Gcc-compiled code is as good or
- faster. Despite claims to the contrary in Thompson's paper. My guess is
- that either (a) he didn't use -O with gcc, or (b) he ran his comparisons
- on the MIPS. The MIPS version of gcc in 1990 was very poorly tuned. (On
- the 680x0, also add (c) use of 16-bit addressing modes that Gcc can't use
- for lack of linker magic.)
-
- There is no question, though, that both Lcc and 2c themselves run much
- faster than gcc. Lcc is at least twice as fast, and 2c is probably faster
- still. The Bell Labs folks seem to care more about compile time than
- extreme optimization of the generated code. This is quite reasonable
- considering how much of their time they spend compiling.
-
- Unfortunately, I have no hard data to offer and I no longer have access to
- Lcc or 2c. It would be nice if a disinterested third party with access to
- all three compilers would do a comparison...
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-