* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
@ 2007-01-06 0:32 ` chat95 at mac dot com
2007-01-06 0:33 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: chat95 at mac dot com @ 2007-01-06 0:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from chat95 at mac dot com 2007-01-06 00:32 -------
My CPU is :
Jan 6 06:59:54 debussy kernel: ACPI APIC Table: <INTEL D845PESV>
Jan 6 06:59:54 debussy kernel: Timecounter "i8254" frequency 1193182 Hz
quality 0
Jan 6 06:59:54 debussy kernel: CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz
(2400.10-MHz 686-
class CPU)
Jan 6 06:59:54 debussy kernel: Origin = "GenuineIntel" Id = 0xf27 Stepping =
7
Jan 6 06:59:54 debussy kernel:
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,A
PIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Jan 6 06:59:54 debussy kernel: Features2=0x4400<CNTX-ID,<b14>>
Jan 6 06:59:54 debussy kernel: real memory = 1072955392 (1023 MB)
Jan 6 06:59:54 debussy kernel: avail memory = 1040994304 (992 MB)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
2007-01-06 0:32 ` [Bug fortran/30388] " chat95 at mac dot com
@ 2007-01-06 0:33 ` pinskia at gcc dot gnu dot org
2007-01-06 0:38 ` chat95 at mac dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-06 0:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-01-06 00:33 -------
What happens if you use -O2 instead of -O ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
2007-01-06 0:32 ` [Bug fortran/30388] " chat95 at mac dot com
2007-01-06 0:33 ` pinskia at gcc dot gnu dot org
@ 2007-01-06 0:38 ` chat95 at mac dot com
2007-01-06 2:13 ` jvdelisle at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: chat95 at mac dot com @ 2007-01-06 0:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from chat95 at mac dot com 2007-01-06 00:38 -------
% gfortran42 -o himenobmtxp_m.gfortran42 -O2 -ffast-math -finline-functions
-fomit-frame-pointer -funroll-loops -fexpensive-optimizations himenobmtxp_m.f
% ./himenobmtxp_m.gfortran42
mimax= 257 mjmax= 129 mkmax= 129
imax= 256 jmax= 128 kmax= 128
Start rehearsal measurement process.
Measure the performance in 3 times.
MFLOPS: 194.9637 time(s): 2.109703 1.6937795E-03
Now, start the actual measurement process.
The loop will be excuted in 85 times.
This will take about one minute.
Wait for a while.
Loop executed for 85 times
Gosa : 1.4063698E-03
MFLOPS: 391.9939 time(s): 29.72989
Score based on Pentium III 600MHz : 4.731940
PAUSE
To resume execution, type go. Other input will terminate the job.
% g77-34 -o himenobmtxp_m.g77 -O2 -ffast-math -finline-functions
-fomit-frame-pointer -funroll-loops -fexpensive-optimizations himenobmtxp_m.f
% ./himenobmtxp_m.g77
mimax= 257 mjmax= 129 mkmax= 129
imax= 256 jmax= 128 kmax= 128
Start rehearsal measurement process.
Measure the performance in 3 times.
MFLOPS: 242.952499 time(s): 1.69298697 0.00169377949
Now, start the actual measurement process.
The loop will be excuted in 106 times.
This will take about one minute.
Wait for a while.
Loop executed for 106 times
Gosa : 0.00136957248
MFLOPS: 246.231003 time(s): 59.0223999
Score based on Pentium III 600MHz : 2.97236848
PAUSE statement executed
To resume execution, type go. Other input will terminate the job.
Summary:
g77-34 with -O : 431.486053 MFLOPS
g77-34 with -O2 -ffast-math -finline-functions -fomit-frame-pointer
-funroll-loops -fexpensive-optimizations
: 246.231003 MFLOPS
gfortran42 with -O : 372.9143 MFLOPS
gfortran42 with -O2 -ffast-math -finline-functions -fomit-frame-pointer
-funroll-loops -fexpensive-optimizations
: 391.9939 MFLOPS
gfortran42 with -O2 ... produced faster code than gfortran42 -O, but
slower than g77-34 with -O, but g77-34 with -O2 ... produces very slow
code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (2 preceding siblings ...)
2007-01-06 0:38 ` chat95 at mac dot com
@ 2007-01-06 2:13 ` jvdelisle at gcc dot gnu dot org
2007-01-06 2:36 ` brooks at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-06 2:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2007-01-06 02:13 -------
Could you please post a gzipped version of the test case?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (3 preceding siblings ...)
2007-01-06 2:13 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-06 2:36 ` brooks at gcc dot gnu dot org
2007-01-06 4:44 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-01-06 2:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from brooks at gcc dot gnu dot org 2007-01-06 02:36 -------
Created an attachment (id=12863)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12863&action=view)
Original source file (extracted from archive)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (4 preceding siblings ...)
2007-01-06 2:36 ` brooks at gcc dot gnu dot org
@ 2007-01-06 4:44 ` jvdelisle at gcc dot gnu dot org
2007-01-06 5:05 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-06 4:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-01-06 04:44 -------
With my system: x86-64 Linux
Using -O3 -ffast-math in both cases:
g77: MFLOPS: 893.198364
gfortran: MFLOPS: 895.7278
Using -O3 -ffast-math in both cases:
g77: MFLOPS: 930.39801
gfortran: MFLOPS: 891.1194
Using -O1 -ffast-math in both cases:
g77: MFLOPS: 962.237854
gfortran: MFLOPS: 890.9428
Using -O1 -ffast-math in both cases:
g77: MFLOPS: 259.945648
gfortran: MFLOPS: 199.7145
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (5 preceding siblings ...)
2007-01-06 4:44 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-06 5:05 ` jvdelisle at gcc dot gnu dot org
2007-01-06 5:08 ` chat95 at mac dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-06 5:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2007-01-06 05:05 -------
According to gprof, not unexpected, 97% of time is in the jacoobi routine.
This might warrant further study by the optimizer experts. Certainly not by
me. :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (6 preceding siblings ...)
2007-01-06 5:05 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-06 5:08 ` chat95 at mac dot com
2007-01-06 5:26 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: chat95 at mac dot com @ 2007-01-06 5:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from chat95 at mac dot com 2007-01-06 05:08 -------
Using -O3 -ffast-math in both cases:
Using -O3 -ffast-math in both cases:
Using -O1 -ffast-math in both cases:
Using -O1 -ffast-math in both cases:
what's the difference between theset two?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (7 preceding siblings ...)
2007-01-06 5:08 ` chat95 at mac dot com
@ 2007-01-06 5:26 ` jvdelisle at gcc dot gnu dot org
2007-01-06 10:17 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-06 5:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2007-01-06 05:26 -------
Typo on my part:
They are:
-O3
-O2
-O1
-O0
In that order. I apologize
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (8 preceding siblings ...)
2007-01-06 5:26 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-06 10:17 ` rguenth at gcc dot gnu dot org
2007-01-23 15:24 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-06 10:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2007-01-06 10:17 -------
Well, it all boils down to differences in induction variable choices. The
choice made by 3.4 (for i686) doesn't look too good to me compared to 4.1.2
here.
4.1: MFLOPS: 990.4130 time(s): 28.10176
3.4: MFLOPS: 449.016235 time(s): 59.8477402
(-O2 -ffast-math -funroll-loops -fomit-frame-pointer)
The predcomm branch should be able to do a lot better here.
With SSE math I get
4.1: MFLOPS: 954.2382 time(s): 31.46597
3.4: MFLOPS: 467.92215 time(s): 59.1876984
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (9 preceding siblings ...)
2007-01-06 10:17 ` rguenth at gcc dot gnu dot org
@ 2007-01-23 15:24 ` fxcoudert at gcc dot gnu dot org
2007-12-17 6:10 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-01-23 15:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from fxcoudert at gcc dot gnu dot org 2007-01-23 15:23 -------
Well, I can confirm that one the reporter's code, on my i686-linux (Intel(R)
Pentium(R) III CPU family 1266MHz), whatever optimisation flags I give to
gfortran-4.3, "g77-3.4.6 -O" does a better job.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-01-23 15:23:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (10 preceding siblings ...)
2007-01-23 15:24 ` fxcoudert at gcc dot gnu dot org
@ 2007-12-17 6:10 ` jvdelisle at gcc dot gnu dot org
2007-12-17 6:33 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-12-17 6:10 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2007-12-17 06:10 -------
Here is a twist on the test case
gfc -O2 -m64 -ffast-math -funroll-all-loops -fipa-pta -fivopts poisson.f
poisson.f:111.72:
pause
1
Warning: Deleted feature: PAUSE statement at (1)
poisson.f: In function jacobi:
poisson.f:233: error: stmt (0x2aaaaeb4f300) marked modified after optimization
pass:
D.1063_9 = *nn_8(D);
poisson.f:233: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (11 preceding siblings ...)
2007-12-17 6:10 ` jvdelisle at gcc dot gnu dot org
@ 2007-12-17 6:33 ` steven at gcc dot gnu dot org
2008-02-17 4:11 ` jvdelisle at gcc dot gnu dot org
2008-11-26 4:07 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-12-17 6:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from steven at gcc dot gnu dot org 2007-12-17 06:33 -------
-fipa-pta is broken iirc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (12 preceding siblings ...)
2007-12-17 6:33 ` steven at gcc dot gnu dot org
@ 2008-02-17 4:11 ` jvdelisle at gcc dot gnu dot org
2008-11-26 4:07 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-17 4:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jvdelisle at gcc dot gnu dot org 2008-02-17 04:11 -------
Two questions on this PR.
Is there really anything on the gfortran side we can do to make this better or
is it really a middle-end / back-end issue?
Can we close this pr or change the component to other than fortran?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/30388] gfortran42 is slower than g77 3.4 about 10%
2007-01-06 0:30 [Bug fortran/30388] New: gfortran42 is slower than g77 3.4 about 10% chat95 at mac dot com
` (13 preceding siblings ...)
2008-02-17 4:11 ` jvdelisle at gcc dot gnu dot org
@ 2008-11-26 4:07 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-26 4:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jvdelisle at gcc dot gnu dot org 2008-11-26 04:05 -------
Not a gfortran frontend issue, so closing.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30388
^ permalink raw reply [flat|nested] 16+ messages in thread