* Gnu g77/gcc on DEC ALPHA running DEC UNIX @ 1997-10-16 4:00 eddie scheer 1997-10-16 4:00 ` root 1997-10-18 4:00 ` Jason Patterson 0 siblings, 2 replies; 9+ messages in thread From: eddie scheer @ 1997-10-16 4:00 UTC (permalink / raw) I did a plain installation of gcc and g77 on my Alpha box runnix DEC UNIX. Programs seem to be about 10x slower than those compiled with DEC Fortran. Is this to be expected? -- Edward K. Scheer INTERNET: escheer@whoi.edu BIGELOW 315A ATT: (508) 289-2823 Woods Hole Oceanographic Institution FAX: (619) 457-2194 86 Water Street, Woods Hole, MA 02543 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-16 4:00 Gnu g77/gcc on DEC ALPHA running DEC UNIX eddie scheer @ 1997-10-16 4:00 ` root 1997-10-16 4:00 ` Jeffrey Potoff 1997-10-20 4:00 ` Glen Turner 1997-10-18 4:00 ` Jason Patterson 1 sibling, 2 replies; 9+ messages in thread From: root @ 1997-10-16 4:00 UTC (permalink / raw) eddie scheer (escheer@whoi.edu) wrote: : I did a plain installation of gcc and g77 on my Alpha box runnix : DEC UNIX. Programs seem to be about 10x slower than those compiled with : DEC Fortran. Is this to be expected? Yes, it is. Cause gcc doesn't know anything worth mentioning about instruction scheduling or memory-wise behaviour. The factor of 10 is heavy, maybe it's a benchmarking problem, but a factor of >> 2 is realistic. This one of the reasons why DEC's Linux/Alpha project does not come up to pace, the Alpha could go much faster, but it would need the right compiler technology. Still it is incredibly fast. My suggestion: do use gcc for development work such as syntax checking, and DEC C for the final production compilation. -- ------------------------------------------------------------------------------ Ruediger Schuetz Phone/Fax: 00 49-89-65 81 92 Edlinger Platz 4 81543 Muenchen Ruediger.Schuetz@Munich.Netsurf.DE Germany ------------------------------------------------------------------------------ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-16 4:00 ` root @ 1997-10-16 4:00 ` Jeffrey Potoff 1997-10-20 4:00 ` Glen Turner 1 sibling, 0 replies; 9+ messages in thread From: Jeffrey Potoff @ 1997-10-16 4:00 UTC (permalink / raw) root wrote: > > eddie scheer (escheer@whoi.edu) wrote: > : I did a plain installation of gcc and g77 on my Alpha box runnix > : DEC UNIX. Programs seem to be about 10x slower than those compiled with > : DEC Fortran. Is this to be expected? > > Yes, it is. Cause gcc doesn't know anything worth mentioning about instruction > scheduling or memory-wise behaviour. The factor of 10 is heavy, maybe it's a > benchmarking problem, but a factor of >> 2 is realistic. Huh ? 10x means something is terribly wrong. We typically see, at most, a 25% difference in execution time when comparing g77 and DEC Fortran 90. Jeff ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-16 4:00 ` root 1997-10-16 4:00 ` Jeffrey Potoff @ 1997-10-20 4:00 ` Glen Turner 1997-10-20 4:00 ` Jason Patterson 1 sibling, 1 reply; 9+ messages in thread From: Glen Turner @ 1997-10-20 4:00 UTC (permalink / raw) root wrote: > ... gcc doesn't know anything worth mentioning about instruction > scheduling or memory-wise behaviour. Actually, gcc is one of the better compilers in this respect. It's just that the Alpha processor support is quick and nasty. The Alpha Linux project is aware of the need to reimplement the gcc support for Alpha in a more complete way, and are encouraging people within DEC to do so. -- Glen Turner Network Support Specialist gdt@itd.adelaide.edu.au Information Technology Division Tel: +61 8 8303 3936 University of Adelaide SA 5005 http://www.adelaide.edu.au/~gturner Australia [ A university is a loosely-coupled organisation ] [ held together by a common interest in parking. ] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-20 4:00 ` Glen Turner @ 1997-10-20 4:00 ` Jason Patterson 0 siblings, 0 replies; 9+ messages in thread From: Jason Patterson @ 1997-10-20 4:00 UTC (permalink / raw) Glen Turner wrote: > > ... gcc doesn't know anything worth mentioning about instruction > > scheduling or memory-wise behaviour. > > Actually, gcc is one of the better compilers in this respect. Well, that's a bit of a stretch :-) gcc 2.7.* does no serious alias analysis or static branch prediction, and it's instruction scheduling support is pretty weak (basic block scheduling only, and no software pipelining). gcc has a pretty good global register allocator, and reasonable global optimizations (strength reduction etc), but that's about it. > It's just that the Alpha processor support is quick and nasty. That is also true. > The Alpha Linux project is aware of the need to reimplement > the gcc support for Alpha in a more complete way, and are > encouraging people within DEC to do so. Actually, the egcs project ( http://www.cygnus.com/egcs/ ) is doing several things to improve gcc's optimization abilities. It is adding alias analysis and global instruction scheduling, among other things. egcs is still very much in beta testing though. But at the moment, gcc is no match for the vendors compilers on Alpha 21164, UltraSPARC or MIPS R10000, and even on older/narrower processors (Alpha 21064, Super/hyperSPARC, MIPS R4x00) gcc is at least 10-20% off the pace on SPEC and similar benchmarks. On the other hand, gcc is infinitely cheaper than the vendors compilers :-) JASON PATTERSON jason@reflections.com.au http://www.reflections.com.au/~jason Imagine that CRAY decides to make a personal computer. It contains 16 Alpha based processors executing in parallel, has 800 megabytes of RAM, 9 Gigabytes of disk storage, a resolution of 4096 x 4096 pixels, does 24bit 3D graphics in realtime, relies entirely on voice recognition for input, fits in your shirt pocket and costs $300. What is the first question the computer community asks? "Is it DOS compatible?" ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-16 4:00 Gnu g77/gcc on DEC ALPHA running DEC UNIX eddie scheer 1997-10-16 4:00 ` root @ 1997-10-18 4:00 ` Jason Patterson 1997-10-22 4:00 ` Hugues Talbot 1 sibling, 1 reply; 9+ messages in thread From: Jason Patterson @ 1997-10-18 4:00 UTC (permalink / raw) eddie scheer wrote: > I did a plain installation of gcc and g77 on my Alpha box runnix > DEC UNIX. Programs seem to be about 10x slower than those compiled with > DEC Fortran. Is this to be expected? 10x is probably an exaggeration, right? But yes, the GNU compilers have a lot less powerful optimizers, particularly when it comes to instruction scheduling, which is a key performance factor on the Alpha's and UltraSPARC's, unlike the Pentium Pro, MIPS R10000 or PowerPC 604 all of which do a fair bit of dynamic scheduling. The compiler really has to "spoon feed" the pipelines of the Alpha 21164 and UltraSPARC to get maximum performance, and the relatively poor scheduler in gcc/g++/g77 simply doesn't do that very well. A factor of 2 difference between g77 and DEC's compiler is quite reasonable. Anything more than that is probably a sign of pathological cache behavior (which might also be a compiler issue of a different type :-) JASON PATTERSON jason@reflections.com.au http://www.reflections.com.au/~jason Imagine that CRAY decides to make a personal computer. It contains 16 Alpha based processors executing in parallel, has 800 megabytes of RAM, 9 Gigabytes of disk storage, a resolution of 4096 x 4096 pixels, does 24bit 3D graphics in realtime, relies entirely on voice recognition for input, fits in your shirt pocket and costs $300. What is the first question the computer community asks? "Is it DOS compatible?" ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-18 4:00 ` Jason Patterson @ 1997-10-22 4:00 ` Hugues Talbot 1997-10-22 4:00 ` Jason Patterson 1997-10-22 4:00 ` Kevin Oberman 0 siblings, 2 replies; 9+ messages in thread From: Hugues Talbot @ 1997-10-22 4:00 UTC (permalink / raw) We use Gcc and DEC C a fair bit around here on 21064 processors. In our experience, it is not true that DEC C is significantly faster than gcc. At most 10-20%, and for some applications, gcc has been observed to be faster by a factor of 10-20% as well. We need and use both compilers on a regular basis. However, g77 is not a bona-fide FORTRAN compiler. G77 is still in beta. The DEC FORTRAN compiler is nothing short of amazing in terms of the optimization that it can perform. This is apparently due to the structure of the language, which is generally considered easier to optimize (but I'm not a specialist of these questions) than C. A factor of 2 between g77 and DEC FORTRAN is believable, but not a factor of 10. A factor of more than 30% between DEC C and gcc is hardly believable on a complex application. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-22 4:00 ` Hugues Talbot @ 1997-10-22 4:00 ` Jason Patterson 1997-10-22 4:00 ` Kevin Oberman 1 sibling, 0 replies; 9+ messages in thread From: Jason Patterson @ 1997-10-22 4:00 UTC (permalink / raw) Hugues Talbot wrote: > We use Gcc and DEC C a fair bit around here on 21064 > processors. In our experience, it is not true that DEC C is > significantly faster than gcc. At most 10-20% Yes, but the 21064 is only a dual issue processor, so the weaknesses in gcc's instruction scheduler are a lot less important. On the 4 issue 21164 the difference is much more noticeable. > The DEC FORTRAN compiler is nothing short of amazing in terms of > the optimization that it can perform. This is apparently due to the > structure of the language, which is generally considered easier to > optimize (but I'm not a specialist of these questions) than C. FORTRAN has rules which prohibit certain classes of aliasing between function arguments. So for a FORTRAN function taking two arrays as arguments, the compiler can safely assume that the two arrays don't overlap, whereas this is not true in C or C++. Similarly, FORTRAN (77) doesn't really have the concept of pointers. Both these things make alias analysis and dependency checking much easier, so that more things can be done in parallel. This really goes to the extreme on vector supercomputers (eg Cray), where finding this parallelism is critical: array addition is a single instruction on a Cray if you can prove that the arrays don't overlap. > A factor of more than 30% between DEC C and gcc is hardly believable > on a complex application. For most C programs, probably yes, because C programs tend to be more memory bound (pointer chasing etc). But for inner loops which get software pipelined, a factor of 2 is quite possible (especially for FORTRAN, but even for C programs). JASON PATTERSON jason@reflections.com.au http://www.reflections.com.au/~jason Imagine that CRAY decides to make a personal computer. It contains 16 Alpha based processors executing in parallel, has 800 megabytes of RAM, 100 Gigabytes of disk storage, a resolution of 4096 x 4096 pixels, does 24bit 3D graphics in realtime, relies entirely on voice recognition for input, fits in your shirt pocket and costs $300. What is the first question the computer community asks? "Is it DOS compatible?" ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX 1997-10-22 4:00 ` Hugues Talbot 1997-10-22 4:00 ` Jason Patterson @ 1997-10-22 4:00 ` Kevin Oberman 1 sibling, 0 replies; 9+ messages in thread From: Kevin Oberman @ 1997-10-22 4:00 UTC (permalink / raw) Hugues Talbot <talbot@fire.nsw.cmis.CSIRO.AU> writes: > We use Gcc and DEC C a fair bit around here on 21064 > processors. In our experience, it is not true that DEC C is > significantly faster than gcc. At most 10-20%, and for some > applications, gcc has been observed to be faster by a factor of 10-20% > as well. We need and use both compilers on a regular basis. This does not match my experience. I have always found DEC C to be at least as fast as gcc and usually a fair bit faster. Which "DEC C" are you running? The old MIPS technology or the new GEM compiler? Under 4.0, it's the new one. Under 3.2 it is the old one by default and the new one only when the -migrate option is used (and the license is in place.) The results you report do match my experience between gcc and the old complier. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest Orlando Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1997-10-22 4:00 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1997-10-16 4:00 Gnu g77/gcc on DEC ALPHA running DEC UNIX eddie scheer 1997-10-16 4:00 ` root 1997-10-16 4:00 ` Jeffrey Potoff 1997-10-20 4:00 ` Glen Turner 1997-10-20 4:00 ` Jason Patterson 1997-10-18 4:00 ` Jason Patterson 1997-10-22 4:00 ` Hugues Talbot 1997-10-22 4:00 ` Jason Patterson 1997-10-22 4:00 ` Kevin Oberman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox