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