home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / compiler / 2102 < prev    next >
Encoding:
Text File  |  1993-01-07  |  2.5 KB  |  49 lines

  1. Newsgroups: comp.compilers
  2. 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
  3. From: Michael John Haertel <mike@skinner.cs.uoregon.edu>
  4. Subject: Gcc, Lcc, and 2c
  5. Reply-To: Michael John Haertel <mike@skinner.cs.uoregon.edu>
  6. Organization: Compilers Central
  7. Date: Thu, 7 Jan 1993 01:30:46 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <93-01-025@comp.compilers>
  10. Keywords: optimize
  11. References: <93-01-020@comp.compilers> <93-01-017@comp.compilers>
  12. Sender: compilers-sender@iecc.cambridge.ma.us
  13. Lines: 34
  14.  
  15. The moderator wrote:
  16.  
  17. >[It varies all over the place.  The Princeton/Bell Labs lcc compiler
  18. >is supposed to produce better code faster than GCC.  Ken Thompson's Plan 9
  19. >compiler is supposed to be better still in both dimensions. -John]
  20.  
  21. This isn't true.  My experience was that Gcc produces faster code than
  22. Lcc.  Methodology: Compile both compilers with themselves and each other.
  23. Time the amount of time both compilers take.  I found that the
  24. lcc-compiled compilers typically ran 5-10% slower than the gcc-compiled
  25. compilers.  I suspect that any published comparisons that show Lcc
  26. producing faster code are either based on not using -O with gcc, or or
  27. used a poorly tuned port of gcc.
  28.  
  29. I was not able to compare 2c directly with gcc, since gcc had not been
  30. ported to Plan 9, but again I suspect Gcc-compiled code is as good or
  31. faster.  Despite claims to the contrary in Thompson's paper.  My guess is
  32. that either (a) he didn't use -O with gcc, or (b) he ran his comparisons
  33. on the MIPS.  The MIPS version of gcc in 1990 was very poorly tuned.  (On
  34. the 680x0, also add (c) use of 16-bit addressing modes that Gcc can't use
  35. for lack of linker magic.)
  36.  
  37. There is no question, though, that both Lcc and 2c themselves run much
  38. faster than gcc.  Lcc is at least twice as fast, and 2c is probably faster
  39. still.  The Bell Labs folks seem to care more about compile time than
  40. extreme optimization of the generated code.  This is quite reasonable
  41. considering how much of their time they spend compiling.
  42.  
  43. Unfortunately, I have no hard data to offer and I no longer have access to
  44. Lcc or 2c.  It would be nice if a disinterested third party with access to
  45. all three compilers would do a comparison...
  46. -- 
  47. Send compilers articles to compilers@iecc.cambridge.ma.us or
  48. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  49.