* zlib-1.1.3 compiles with ccc @ 2000-09-15 4:00 h0l0gRaM 2000-09-15 4:00 ` Michal Jaegermann 0 siblings, 1 reply; 13+ messages in thread From: h0l0gRaM @ 2000-09-15 4:00 UTC (permalink / raw) Options -O4 -fast -- An expert is a person who avoids the small errors as he sweeps on to the grand fallacy. -- Benjamin Stolberg ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-15 4:00 zlib-1.1.3 compiles with ccc h0l0gRaM @ 2000-09-15 4:00 ` Michal Jaegermann 2000-09-15 4:00 ` Tony Hammitt ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Michal Jaegermann @ 2000-09-15 4:00 UTC (permalink / raw) h0l0gRaM (hgm@saunalahti.fi) wrote: : Options -O4 -fast So what? With that and hundreds of other compilers. Everybody in this group already knows that you can type 'make' so you can stop now. Linux kernel is NOT written in a standard C, quite deliberately, and it depends on various gcc constructs, inline assembler, a linker behaviour, etc. That is why in its sources you can read a list of various tools requirements. But a bulk of a user-space stuff is written portably and if it is not then it is broken. The only news it would be if you publish a list of sources which do NOT compile with 'ccc' and explain in each case why (i.e. if sources are broken or if that compiler is broken and in which way). Michal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-15 4:00 ` Michal Jaegermann @ 2000-09-15 4:00 ` Tony Hammitt 2000-09-15 23:45 ` h0l0gRaM 2000-09-16 4:00 ` Spuggy Loonpant 2 siblings, 0 replies; 13+ messages in thread From: Tony Hammitt @ 2000-09-15 4:00 UTC (permalink / raw) OK, fine. We're trying to start up a sourceforge project for what packages compile with ccc. I'll admit that I'm not surprised that zlib compiled, but it is another data point at least. The problem is that not only is the kernel gcc-only, but any package that includes kernel or asm headers won't compile either. Other packages have unnecesary default compilation options and optimization levels specified that are gcc specific and have to be patched to even compile correctly. Heck, some even specify gcc explicitly in the makefiles. This is a little annoying. We need to all agree on what makefile macros we're going to use. In short, it is really instructive to know which packages do actually work. I don't know if the package maintainers can agree that they need to standardize $(CC) and $(CFLAGS) but it sure would help. Anyone wanting to help out with the effort can start by going to http://ccclinux.sourceforge.net or http://sourceforge.net/projects/ccclinux/ I'd like some advice about what to do first since I've never done a sourceforge project or a linux distro before. Anyone with relevant experience please contact me. Thanks in advance, Tony Hammitt tony@hammitt.com P.S. does anyone think that something like this would work right: /usr/bin/qcc: #!/bin/sh cccopts="-O4 -fast" gccopts="-O3 -funroll-loops" ccc $@ $cccopts || gcc $@ $gccopts exit 0 then set the default compiler in /usr/lib/rpm/* to qcc and the default CFLAGS to "". That way most friendly objects would get ccc, the unfriendly ones would get gcc and the broken ones would fail. Comments? Criticisms? Condemnations? Michal Jaegermann wrote: > > h0l0gRaM (hgm@saunalahti.fi) wrote: > : Options -O4 -fast > > So what? With that and hundreds of other compilers. Everybody > in this group already knows that you can type 'make' so you can > stop now. > > Linux kernel is NOT written in a standard C, quite deliberately, > and it depends on various gcc constructs, inline assembler, a linker > behaviour, etc. That is why in its sources you can read a list > of various tools requirements. But a bulk of a user-space stuff > is written portably and if it is not then it is broken. The only > news it would be if you publish a list of sources which do NOT > compile with 'ccc' and explain in each case why (i.e. if sources > are broken or if that compiler is broken and in which way). > > Michal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-15 4:00 ` Michal Jaegermann 2000-09-15 4:00 ` Tony Hammitt @ 2000-09-15 23:45 ` h0l0gRaM 2000-09-16 4:00 ` Michal Jaegermann 2000-09-16 4:00 ` Spuggy Loonpant 2 siblings, 1 reply; 13+ messages in thread From: h0l0gRaM @ 2000-09-15 23:45 UTC (permalink / raw) Michal Jaegermann wrote: > > h0l0gRaM (hgm@saunalahti.fi) wrote: > : Options -O4 -fast > > So what? With that and hundreds of other compilers. Everybody > in this group already knows that you can type 'make' so you can > stop now. > They don't compile with any compiler ,many Linux programs are supposed to compile with gcc ,not ccc/cxx or any else. And maybe everybody knows that I can write make ,but would it be great if they have options too which are useful for optimisation ? Or some other switches what are useful/needed for succesful compilation ? Or some patch for source to get it compiled with ccc/cxx ? Have you tested or checked that gcc wastes Alpha power , Compaqs ccc/cxx optimises it ,not loosing like gcc. > Linux kernel is NOT written in a standard C, quite deliberately, > and it depends on various gcc constructs, inline assembler, a linker > behaviour, etc. That is why in its sources you can read a list > of various tools requirements. But a bulk of a user-space stuff > is written portably and if it is not then it is broken. The only > news it would be if you publish a list of sources which do NOT > compile with 'ccc' and explain in each case why (i.e. if sources > are broken or if that compiler is broken and in which way). > > Michal But what about compiling required tools and then patching kernel to compile with ccc ? You sound so inside guy that I think you're using MS Windows more than Linux ,and if using Linux then you use x86 not Alpha. Have you ever thinked to try something else ,not what others use ? -- Horner's Five Thumb Postulate: Experience varies directly with equipment ruined. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-15 23:45 ` h0l0gRaM @ 2000-09-16 4:00 ` Michal Jaegermann 0 siblings, 0 replies; 13+ messages in thread From: Michal Jaegermann @ 2000-09-16 4:00 UTC (permalink / raw) h0l0gRaM (hgm@saunalahti.fi) wrote: : But what about compiling required tools and then patching kernel to : compile with ccc ? Then you have a huge kernel rewrite project on your hands (check kernel sources) with likely with negligible performance results and going fast out of sync with other platforms. In any case most of performance gains you see comes from linking with different libraries and your kernel is not usint either glibc, which definitely could be better on Alpha, or other user space libraries. As for user-space program using kernel headers - for many years now it is repeated over and over that doing that is (with possible few exceptions) an error. The fact that switching a compiler gives you hiccups in such situation is only one of reasons. A need for different compiler flags when switching a compiler is a "fact of life". Those of us who have seen over years a few platforms and a few operating systems do not make a big fuss of that. That is also a reason why projects like 'autoconf' exists. This is not a perfect tool but improving it to make like easier on Linux/Alpha with ccc would be really a worthwhile contribution. : You sound so inside guy that I think you're using MS Windows more than ^^^^ : Linux ,and if using Linux then you use x86 not Alpha. ROTFL. This only shows that you know _very little_. Don't worry, this affliction can be rectified with time. Try strenously to improve your thinking. Michal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-15 4:00 ` Michal Jaegermann 2000-09-15 4:00 ` Tony Hammitt 2000-09-15 23:45 ` h0l0gRaM @ 2000-09-16 4:00 ` Spuggy Loonpant 2000-09-16 4:00 ` sideband 2 siblings, 1 reply; 13+ messages in thread From: Spuggy Loonpant @ 2000-09-16 4:00 UTC (permalink / raw) On 15 Sep 2000 18:53:49 GMT, Michal Jaegermann wrote: >h0l0gRaM (hgm@saunalahti.fi) wrote: >: Options -O4 -fast > >So what? With that and hundreds of other compilers. Everybody >in this group already knows that you can type 'make' so you can >stop now. I have found it to be less trivial than you think to compile stuff using ccc. For instance configure says it doesn't take the -PIC flag which is a problem if you need shared object libraries. hOlOgRaM isn't the only person round here trying to build packages with ccc. It looks like he's about to tell us how to build gnome with it, which I would be most interested to know. Spuggy ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-16 4:00 ` Spuggy Loonpant @ 2000-09-16 4:00 ` sideband 2000-09-16 4:00 ` h0l0gRaM 2000-09-17 4:00 ` Spuggy Loonpant 0 siblings, 2 replies; 13+ messages in thread From: sideband @ 2000-09-16 4:00 UTC (permalink / raw) On or about Sat, 16 Sep 2000 02:49:21 +0100, spuggy@rameses.duat (Spuggy Loonpant), using the forum comp.os.linux.alpha did say: :hOlOgRaM isn't the only person round here trying to build packages :with ccc. It looks like he's about to tell us how to build gnome :with it, which I would be most interested to know. : :Spuggy What's the benifit of ccc over gcc? -SSB ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-16 4:00 ` sideband @ 2000-09-16 4:00 ` h0l0gRaM 2000-09-16 4:00 ` Jeff Sturm 2000-09-17 4:00 ` Spuggy Loonpant 1 sibling, 1 reply; 13+ messages in thread From: h0l0gRaM @ 2000-09-16 4:00 UTC (permalink / raw) sideband wrote: > > On or about Sat, 16 Sep 2000 02:49:21 +0100, spuggy@rameses.duat > (Spuggy Loonpant), using the forum comp.os.linux.alpha did say: > > :hOlOgRaM isn't the only person round here trying to build packages > :with ccc. It looks like he's about to tell us how to build gnome > :with it, which I would be most interested to know. > : > :Spuggy > > What's the benifit of ccc over gcc? > 15-30 percent faster binary code ,sometimes maybe faster. For now ,gnome core & libraries are compiled ,it would be faster if imlib could compile with ccc. But now ,imlib compiles ,but doesn't work correctly ,there's something.... And gnome-libs needs patch ,check http://www.hammitt.com/Linux/cccLinux.shtml -- What excuses stand in your way? How can you eliminate them? -- Roger von Oech ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-16 4:00 ` h0l0gRaM @ 2000-09-16 4:00 ` Jeff Sturm 2000-09-17 0:22 ` h0l0gRaM 0 siblings, 1 reply; 13+ messages in thread From: Jeff Sturm @ 2000-09-16 4:00 UTC (permalink / raw) h0l0gRaM wrote: > > What's the benifit of ccc over gcc? > > > 15-30 percent faster binary code ,sometimes maybe faster. And sometimes slower. It just happens that the first program I bothered to benchmark with ccc (gcbench) ran slower than with gcc. Others show little or no improvement, though executables built with ccc tend to be somewhat smaller. I'm curious, have you made any real measurements of gcc vs. ccc? If so, what version? Did you use the Red Hat-supplied egcs or build the latest release (2.95.2)? Are you using any architecture features (e.g. BWX, MVI), or generating plain (ev4) binaries? GCC has specific weaknesses on Alpha, namely floating-point and the f77 front end. On integer performance it is quite good, and getting better (2.95.2 supports alias detection, among other improvements over egcs). It's actually good to have a choice of compilers. That gives us a baseline for measuring compiler performance, among other things. If we find code that seems to run poorly, we have several options: 1) Modify the source. Optimizers aren't perfect, they can often do much better with a little help, e.g. declare short routines "inline" and use temporary variables for common expressions. 2) Try other compiler flags. Both gcc and ccc have many options, and full optimization is often not helpful. On critical pieces of code it is worthwhile to try several optimization levels and see which give the best results. 3) Use another compiler. For C code, it isn't usually necessary to recompile the entire project. Find the routines that optimize poorly and try compiling them with ccc or gcc as the case may be. Also new releases of the same compiler will have different code generation characterstics. GCC 3, whenever it is released, promises to be a worthy successor to 2.95, especially for c++ code. A dogmatic adherence to one compiler or the other won't give you satisfactory results. Finding and analyzing performance problems will. (Hint: not all problems are compiler related; look in glibc for example.) It's not an easy task, but luckily the Alpha has good tools (ever heard of iprobe?) Perhaps instead of posting "package xxx compiles with ccc", a more meaningful post may be "package xxx compiles with ccc and runs yy% faster on a test case than when compiled with gcc version zzz". Jeff ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-16 4:00 ` Jeff Sturm @ 2000-09-17 0:22 ` h0l0gRaM 0 siblings, 0 replies; 13+ messages in thread From: h0l0gRaM @ 2000-09-17 0:22 UTC (permalink / raw) Jeff Sturm wrote: > > And sometimes slower. It just happens that the first program I bothered > to benchmark with ccc (gcbench) ran slower than with gcc. Others show > little or no improvement, though executables built with ccc tend to be > somewhat smaller. > > I'm curious, have you made any real measurements of gcc vs. ccc? If so, > what version? Did you use the Red Hat-supplied egcs or build the latest > release (2.95.2)? Are you using any architecture features (e.g. BWX, > MVI), or generating plain (ev4) binaries? > I have done few measurement tests. Always there's somehow faster code when compiling with ccc ,but not always. Used compilers are egcs-1.1.2 ,gcc-2.8.1 ,gcc-2.95.2 ,ccc-6.2.9.504-2 and cxx-6.3.9.5. None architechture features used ,not now maybe later ,so I generate plain ev5 binaries. > > It's actually good to have a choice of compilers. That gives us a > baseline for measuring compiler performance, among other things. If we > find code that seems to run poorly, we have several options: > > 1) Modify the source. Optimizers aren't perfect, they can often do much > better with a little help, e.g. declare short routines "inline" and use > temporary variables for common expressions. > Source modification comes when program doesn't compile ,for now ,I don't optimise source itself. > 2) Try other compiler flags. Both gcc and ccc have many options, and > full optimization is often not helpful. On critical pieces of code it > is worthwhile to try several optimization levels and see which give the > best results. > Tried ,when using -strong_volatile , -weak_volatile have shown that they differ in optimisation. > 3) Use another compiler. For C code, it isn't usually necessary to > recompile the entire project. Find the routines that optimize poorly > and try compiling them with ccc or gcc as the case may be. Also new > releases of the same compiler will have different code generation > characterstics. GCC 3, whenever it is released, promises to be a worthy > successor to 2.95, especially for c++ code. > Our projects main goal is to compile so much as we can of standard Linux distro (RedHat for instead) > example.) It's not an easy task, but luckily the Alpha has good tools > (ever heard of iprobe?) > Yes I have heard of it > Perhaps instead of posting "package xxx compiles with ccc", a more > meaningful post may be "package xxx compiles with ccc and runs yy% > faster on a test case than when compiled with gcc version zzz". > Maybe ,now moving to sourceforge site ,no those "xxxxked" postings any more. -- The sooner our happiness together begins, the longer it will last. -- Miramanee, "The Paradise Syndrome", stardate 4842.6 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-16 4:00 ` sideband 2000-09-16 4:00 ` h0l0gRaM @ 2000-09-17 4:00 ` Spuggy Loonpant 2000-09-17 4:00 ` Michal Jaegermann 2000-09-18 3:35 ` Tony Hammitt 1 sibling, 2 replies; 13+ messages in thread From: Spuggy Loonpant @ 2000-09-17 4:00 UTC (permalink / raw) On Sat, 16 Sep 2000 08:14:31 -0400, sideband wrote: > >What's the benifit of ccc over gcc? Programs compiled with ccc are supposed to run up to 30% faster than when compiled with gcc. I haven't been able to verify that for myself yet but if truw it should make gnome a bit more useable on my old multia. Spuggy ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-17 4:00 ` Spuggy Loonpant @ 2000-09-17 4:00 ` Michal Jaegermann 2000-09-18 3:35 ` Tony Hammitt 1 sibling, 0 replies; 13+ messages in thread From: Michal Jaegermann @ 2000-09-17 4:00 UTC (permalink / raw) Spuggy Loonpant (spuggy@rameses.duat) wrote: : On Sat, 16 Sep 2000 08:14:31 -0400, sideband wrote: : > : >What's the benifit of ccc over gcc? : Programs compiled with ccc are supposed to run up to 30% faster than : when compiled with gcc. People who bothered to verify that claim, like Jeff Sturm - for example, have a bit different opinion on the subject. Yes, there are situations where you gain (and some where you loose) but 30% across the board is a bit of exaggregation. :-) Usually the most spectacular numbers come from benchmarks which differ quite a bit from "the real stuff". A "naive" compilation of programs using floating point will get you linked with 'libm' if you are using gcc and 'cpml' when ccc was in use. Depending on what your program is doing gains can be substantial from just switching libraries but this is in reality NOT a compiler dependent. A bit of fiddling with options and you can get 'cpml' with gcc and 'libm' with ccc. Libraries are not the only difference but so far in what I have seen their impact was the most substantial. If your code spends bulk of it time computing elementary trig functions in inner loops then you will be very happy after doing CC=ccc in your Makefile. :-) Saying that I do think that a project like recompiling a bulk of a "standard" Red Hat distribution with ccc is a worthwhile thing to do only if to verify compilers and identify places in sources which should be portable but they are not. Keep in mind that vast majority of "user space" sources used is not Linux, not even mentioning Red Hat distro, specific. I assume, of course, that findings will be shared. If you will get also performance gains then even more joy. Remember also that Red Hat binaries are "generic" in that sense that they are supposed to run on all Alpha platforms. Quite often you can generate a better code if you can afford to be platform specific. OTOH over years I did compile number of things on different platforms (and contributed a code here and there) using a variety of compilers and somehow never crossed my mind to announce every such feat urbi et orbi. :-) Michal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: zlib-1.1.3 compiles with ccc 2000-09-17 4:00 ` Spuggy Loonpant 2000-09-17 4:00 ` Michal Jaegermann @ 2000-09-18 3:35 ` Tony Hammitt 1 sibling, 0 replies; 13+ messages in thread From: Tony Hammitt @ 2000-09-18 3:35 UTC (permalink / raw) Spuggy Loonpant wrote: > > On Sat, 16 Sep 2000 08:14:31 -0400, sideband wrote: > > > >What's the benifit of ccc over gcc? > > Programs compiled with ccc are supposed to run up to 30% faster than > when compiled with gcc. I haven't been able to verify that for myself > yet but if truw it should make gnome a bit more useable on my old > multia. > > Spuggy All generalizations are false. (he he he) It depends on the code. Most programs show significant improvements. My programs show ridiculous, incredible improvements (350%) Same code, same benchmark testing data. Using gcc would more than triple my hardware costs for a fixed amount of work that needs to be done. You have to wonder why Compaq released ccc, I don't need nearly as much hardware... For me, this is all the justification I need to work on the ccclinux project. With the very fine work being done by others on the list like the page coloring patch and all of Goto-san's efforts at BLAS, there's nothing that can touch the AlphaLinux platform for numerical price/ performance ratio. Those who wish to contribute to the project: Thanks! We need the help. Those who don't: Sorry for wasting your bandwidth. Michal, sorry to have contributed to your displeasure. No hard feelings?? Humble regards, Tony Hammitt ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2000-09-18 3:35 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2000-09-15 4:00 zlib-1.1.3 compiles with ccc h0l0gRaM 2000-09-15 4:00 ` Michal Jaegermann 2000-09-15 4:00 ` Tony Hammitt 2000-09-15 23:45 ` h0l0gRaM 2000-09-16 4:00 ` Michal Jaegermann 2000-09-16 4:00 ` Spuggy Loonpant 2000-09-16 4:00 ` sideband 2000-09-16 4:00 ` h0l0gRaM 2000-09-16 4:00 ` Jeff Sturm 2000-09-17 0:22 ` h0l0gRaM 2000-09-17 4:00 ` Spuggy Loonpant 2000-09-17 4:00 ` Michal Jaegermann 2000-09-18 3:35 ` Tony Hammitt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox