home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9152 < prev    next >
Encoding:
Text File  |  1992-08-27  |  3.0 KB  |  69 lines

  1. Organization: Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!<UNAUTHENTICATED>+
  3. Newsgroups: comp.unix.aix
  4. Message-ID: <oebFKM70Bwx3A1859x@transarc.com>
  5. Date: Thu, 27 Aug 1992 13:49:12 -0400 
  6. From: Barry_Wolman@transarc.com
  7. Subject: Re: Benchmark results: xlc vs gcc optimization quality
  8. In-Reply-To: <16174@pitt.UUCP>
  9. References: <16174@pitt.UUCP>
  10. Lines: 57
  11.  
  12. Here's another view of xlc optimization.
  13.  
  14. The Transarc Encina (TM) code base consists of at least 250K lines of
  15. C code, including some large RPC stub modules generated by IDL.  We
  16. discovered that it took about 4 hours to compile with -O and load the
  17. code base on a SPARC II, but it took 17-20 hours to do the same build
  18. on a comparable RS/6000 with xlc.  When I investigated, I found that
  19. xlc was taking inordinate amounts of time to compile the large IDL
  20. stubs.
  21.  
  22. I selected representative code modules written by four different, very
  23. experienced system programmers and one of the IDL stub modules.  These
  24. totaled 34K non-blank lines of code after include file expansion.  The
  25. IDL stub was 19K lines.
  26.  
  27. I found that the vanilla SunOS cc compiler was quite uniform.
  28. Compiling with -O caused the compilation time to increase by a factor
  29. of 2.5 - 3.3.  The AIX xlc compiler showed much greater variability in
  30. compilation times.  Using -o caused the compilation time to increase
  31. by a factor of from 4.6 to 13.7.  The unoptimized AIX xlc compilation
  32. times ranged from .5 to 1.5 times the unoptimized SunOS cc compilation
  33. times, while the optimized AIX xlc compilation times ranged from 1.6
  34. to 12.6 times the optimized SunOS cc compilation times.
  35.  
  36. The IDL stubs caused particular problems for xlc.  The unoptimized
  37. (optimized) compilation times for the SunOS cc compiler were 80 (213)
  38. seconds, while the times for the AIX xlc compiler were 66 (900)
  39. seconds!  Clearly, a major component of the extra 13-16 hours of
  40. compile time was time spent (wasted?) compiling IDL stubs with
  41. optimization.  When performance tests showed no appreciable
  42. performance benefit from optimized stubs, we changed our build rules
  43. to eliminate -O for stubs.  We now compile everything except the
  44. stub modules with -O on all supported platforms.
  45.  
  46. I filed a problem report with IBM on the slow compilation times.  They
  47. gave me an updated xlc a few weeks ago, but there was no noticable
  48. improvement in compile times with -O.  One of the analysts who called
  49. me about this problem said it had something to do with the stub
  50. modules having a large number of external variables that are declared,
  51. but are never referenced in the generated code.  I think there's more
  52. to the problem than this.
  53.  
  54. Has anyone else found examples of code that cause optimized xlc
  55. compilations to take >10 times as long as unoptimized compilations.
  56. Perhaps a better characterization of the performance profile of xlc
  57. might help IBM improve -O compile times.
  58.  
  59.  
  60. Barry Wolman
  61.  
  62. ------------------
  63.  
  64. Encina is a trade mark of Transarc Corporation.
  65.  
  66.  
  67.  
  68.  
  69.