From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11191 invoked by alias); 16 Jun 2013 12:06:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11124 invoked by uid 48); 16 Jun 2013 12:06:22 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52473] CSHIFT slow - inline it? Date: Sun, 16 Jun 2013 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.7.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00838.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52473 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-06-16 Ever confirmed|0 |1 --- Comment #3 from Dominique d'Humieres --- I don't have access to pathf95, but the following test (modified for some I= DRIS benchmarks) subroutine test_cshift() !----------------------------------------------------------------- ! Test de la fonction intrins=C3=A8que "cshift" !----------------------------------------------------------------- implicit none integer, parameter :: n=3Dordre integer :: i,j integer, dimension(n) :: vect=3D(/ (-i, i=3D1,n) /) real(kind=3Dprec),dimension(n,n) :: t,td,t2,t1 real(kind=3Dprec) :: cste call impression_entete("test_cshift") print *, "Order of matrix:", n !---- Initialisations -------------------------- cste=3Dexp(1._prec) t(:,:) =3D reshape( & source=3D(/ (i*cste,i=3D1,n*n) /) , shape =3D (/ n,n /) ) td(:,:) =3D 0._prec call cpu_time( val_temps(1) ) td(:,:) =3D cshift(array=3Dt(:,:), shift=3Dvect(:), dim=3D1) call cpu_time( val_temps(2) ) t1(:,:) =3D td(:,:) call temps_consomme("test_cshift> 1) CSHIFT") !---- D=C3=A9calage selon les lignes via des boucles ------------------= -- td(:,:) =3D 0._prec call cpu_time( val_temps(1) ) do j=3D1,n do i=3Dn+vect(j),1,-1 td(i-vect(j),j) =3D t(i,j) end do do i=3D1,-vect(j) td(i,j)=3Dt(n+vect(j)+i,j) end do end do call cpu_time( val_temps(2) ) t2(:,:) =3D td(:,:) call temps_consomme("test__cshift> 2) DO loop") if (sum(abs(t2-t1)) /=3D 0._prec) then print *,'Mauvais r=C3=A9sultats !!!!',sum(abs(t2-t1)) else print *,'Results OK' end if=20=20=20=20 end subroutine test_cshift gives =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Call to test_cshift =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Order of matrix: 1000 test_cshift> 1) CSHIFT Used CPU time =3D=3D> 7.624 = ms test__cshift> 2) DO loop Used CPU time =3D=3D> 4.482 = ms Results OK So CSHIFT is 50% slower than the DO loop. Note that I get similar results for EOSHIFT and RESHAPE: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Call to test_eoshift =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Order of matrix: 1000 test_eoshift> 1) EOSHIFT Used CPU time =3D=3D> 7.443 = ms test__eoshift> 2) DO loop Used CPU time =3D=3D> 3.775 = ms Results OK =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Call to test_reshape =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Order of matrix: 1000 test__reshape> 1) RESHAPE Used CPU time =3D=3D> 10.624 = ms test__reshape> 2) DO loop Used CPU time =3D=3D> 4.442 = ms Results OK PR45689 should probably fixed at the same time. >>From gcc-bugs-return-424460-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jun 16 12:06:58 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11959 invoked by alias); 16 Jun 2013 12:06:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 11915 invoked by uid 48); 16 Jun 2013 12:06:55 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45689] [F2003] Missing transformational intrinsic in the trans_func_f2003 list Date: Sun, 16 Jun 2013 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00839.txt.bz2 Content-length: 514 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-06-16 Ever confirmed|0 |1 --- Comment #5 from Dominique d'Humieres --- Related or duplicate of PR52473.