Re: Will C++ compilers ever be better than C compilers?

Toon Moene <toon@moene.indiv.nluug.nl>
10 Aug 1998 23:26:16 -0400

          From comp.compilers

Related articles
[8 earlier articles]
Re: Will C++ compilers ever be better than C compilers? terryg@uswest.net (1998-08-04)
Re: Will C++ compilers ever be better than C compilers? mayan@watson.ibm.com (1998-08-04)
Re: Will C++ compilers ever be better than C compilers? chase@naturalbridge.com (David Chase) (1998-08-04)
Re: Will C++ compilers ever be better than C compilers? sandy.harris@sympatico.ca (1998-08-04)
Re: Will C++ compilers ever be better than C compilers? mrs@kithrup.com (1998-08-10)
Re: Will C++ compilers ever be better than C compilers? mrs@kithrup.com (1998-08-10)
Re: Will C++ compilers ever be better than C compilers? toon@moene.indiv.nluug.nl (Toon Moene) (1998-08-10)
| List of all articles for this month |
From: Toon Moene <toon@moene.indiv.nluug.nl>
Newsgroups: comp.compilers
Date: 10 Aug 1998 23:26:16 -0400
Organization: Moene Computational Physics, Maartensdijk, The Netherlands
References: 98-08-011 98-08-044
Keywords: C++, optimize

mrs@kithrup.com (Mike Stump) wrote:


> In g++, almost all our time (the people that work on the C++ front
> end) _is_ spent on the C++ frontend, and almost 0% (1-2% maybe) on the
> backend, or classical optimization issues. By classical, I mean
> things unrelated to optimizations involving things like using thunks
> or vtable layout.


You forgot to mention that Mark Mitchell repaired a long standing deficiency
in loop optimisation (basing himself on a C++ example), that normally would
be most influential on Fortran code:


              subroutine gemm(a, b, c, m, n, k)
              integer i,m,n,k,l,j
              dimension a(k,m), b(n,k), c(n,m)
              do i=1,m ! poor for illustration only
                  do j=1,n
                      c(j,i) = 0.0
                      do l=1,k
                          c(j,i) = c(j,i) + a(l,i)*b(j,l)
                      end do
                  end do
              end do
              end


Up till now, egcs isn't clever enough to hoist the (constant) reference of
c(j,i) out of the inner loop - with Mark's changes, it will.


--
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.org; NWP: http://www.knmi.nl/hirlam
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.