From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10872d,71c35a0e73c110d5 X-Google-Attributes: gid10872d,public X-Google-Thread: fcda7,71c35a0e73c110d5 X-Google-Attributes: gidfcda7,public X-Google-Thread: 1164f8,71c35a0e73c110d5 X-Google-Attributes: gid1164f8,public X-Google-Thread: 115614,71c35a0e73c110d5 X-Google-Attributes: gid115614,public X-Google-Thread: 11035d,71c35a0e73c110d5 X-Google-Attributes: gid11035d,public X-Google-Thread: fa528,71c35a0e73c110d5 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-08-02 05:41:58 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!newsfeed.cwix.com!avalon.net!dsiebert From: Douglas Siebert Newsgroups: comp.sys.hp.hpux,comp.unix.tru64,comp.sys.dec,comp.unix.solaris,comp.sys.sgi.admin,comp.unix.aix Subject: Re: Free UNIX for non-commerical use. Date: Mon, 28 Jul 2003 17:39:04 +0000 (UTC) Organization: Avalon Networks Inc. Message-ID: References: <3F233C74.4F4C3BAB@ntlworld.com> <3F2368E5.ED5037A0@hotmail.com> <3F23A005.83B7C2DA@hotmail.com> <3f23a698$0$15040$cc9e4d1f@news.dial.pipex.com> <3F251918.B861101C@ntlworld.com> NNTP-Posting-Host: slacker.khamsin.net X-Trace: sword.avalon.net 1059413944 14218 216.137.65.54 (28 Jul 2003 17:39:04 GMT) X-Complaints-To: support@avalon.net NNTP-Posting-Date: Mon, 28 Jul 2003 17:39:04 +0000 (UTC) User-Agent: nn/6.6.4 Xref: archiver1.google.com comp.sys.hp.hpux:30058 comp.unix.tru64:10492 comp.sys.dec:16562 comp.unix.solaris:164542 comp.sys.sgi.admin:18871 comp.unix.aix:54262 Greg Menke writes: >"Uli Link" writes: >> >> Don't agree: the optimization of the GCC has become much better: >> in 9 out of 10 times the GCC produces faster binaries than vendor compilers >> Perhaps not, if you will tune every single object, and put a lot of #pragma >> in your source to keep the vendor compilers from producing invalid code. >> On AIX IBM's xlc build faster common-mode bins, but if you mind peak >> performance, you should try the GCC 3.x and the cpu-specific optimizations. >> Never got working binaries from any GNU code with xlc and "-O5". >> GCC's results were up to 10% faster on PowerPC, with greater difference for >> float compared to integer. >> Same for Solaris x86, SCO and NCR's MP-RAS. >> A great time-saver of the GCC is the fix of bugs in the O/S include headers. >I have never yet seen gcc 3.2 or previous generate faster code than >Sun's C compiler. I've seen improvements up to 10* by switching to >Sun's cc, depending on the code. Thats with specific cpu/architecture >selection and high optimization selected for both gcc and cc, >compiling plain C code. When people are producing better code using gcc than vendor compilers, its because 1) they don't know the options for the vendor compiler too well, or 2) they have a program whose execution time is dominated by one or two loops and gcc happens to handle the particular way that code is written better or 3) they aren't using some of the higher end optimization features like interprocedural optimization, profile based optimization, etc. Often just reording the C code or changing arrays to pointers or vice versa, etc. can change the performance significantly. Certain code constructs just fit what the compiler expects to see for given optimizations better than others. Those who experiment reap the benefits. Look at the recent controversy over Apple's G5 ads where they used gcc for both the G5 and P4. The P4 took at least a 30% hit by using gcc, because it can't come close to Intel's compiler in optimization. I'm pretty sure once IBM releases their own hardware based on the 970 it'll show numbers much better than Apple's for equivalent hardware, because IBM's compiler is better, at least when you use all the optimizations that are available to you. Whether the numbers you see at SPEC are realistic is another matter, most people (and many commercial apps) just use -O or -O rather than checking what options are out there. gcc tends to be relatively better in these limited circumstances (mainly because it rolls a lot more stuff in the -O and -O2 than vendor compilers for code quality/safety reasons) Profile based optimization is a pain, one of my major pet peeves with SPEC is that it allows this for the 'base' numbers. -- Douglas Siebert dsiebert@excisethis.khamsin.net "Suppose you were an idiot. And suppose you were a member of Congress. But I repeat myself." -- Mark Twain