From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,94044dd34ac72fc0 X-Google-Attributes: gidfee84,public From: Jason Patterson Subject: Re: Gnu g77/gcc on DEC ALPHA running DEC UNIX Date: 1997/10/22 Message-ID: <344DC188.37F3E3EE@reflections.com.au>#1/1 X-Deja-AN: 282378405 References: <34462CF3.41C6@whoi.edu> <34486EB9.A6069CC0@reflections.com.au> X-Priority: 3 (Normal) Organization: Digital Reflections Newsgroups: comp.unix.osf.osf1 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?"