public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35709] New: severe perfromance degradation with "float complex" type
@ 2008-03-26 19:23 sergstesh at yahoo dot com
2008-03-26 19:24 ` [Bug c/35709] " sergstesh at yahoo dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: sergstesh at yahoo dot com @ 2008-03-26 19:23 UTC (permalink / raw)
To: gcc-bugs
Compiling and running the same test case with gcc-4.2.3 and gcc-4.3.0 shows
that in the latter case performance takes an almost 3x hit:
"
sergei@amdam2:/mnt/sda1/sergei/learning_octave>
/maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.3/binsh/gcc -Wall
-mtune=native -march=native -O2 -msse -lm complex_multiplication_testcase.c -o
complex_multiplication_testcase
sergei@amdam2:/mnt/sda1/sergei/learning_octave> time
./complex_multiplication_testcase
executions of straightforward_multiply_with_ptrs() took 6.77 seconds at line
number 136 of 'complex_multiplication_testcase.c' file
executions of straightforward_multiply() took 6.74 seconds at line number 154
of 'complex_multiplication_testcase.c' file
executions of straightforward_multiply_2_signals() took 8.62 seconds at line
number 172 of 'complex_multiplication_testcase.c' file
real 0m22.326s
user 0m22.121s
sys 0m0.012s
sergei@amdam2:/mnt/sda1/sergei/learning_octave>
/maxtor5/sergei/AppsFromScratchWD/install/gcc-4.3.0/binsh/gcc -Wall
-mtune=native -march=native -O2 -msse -lm complex_multiplication_testcase.c -o
complex_multiplication_testcase
sergei@amdam2:/mnt/sda1/sergei/learning_octave> time
./complex_multiplication_testcase
executions of straightforward_multiply_with_ptrs() took 18.17 seconds at line
number 136 of 'complex_multiplication_testcase.c' file
executions of straightforward_multiply() took 16.91 seconds at line number 154
of 'complex_multiplication_testcase.c' file
executions of straightforward_multiply_2_signals() took 30.64 seconds at line
number 172 of 'complex_multiplication_testcase.c' file
real 1m6.306s
user 1m5.676s
sys 0m0.056s
sergei@amdam2:/mnt/sda1/sergei/learning_octave>
"
- see, for example,
executions of straightforward_multiply() took 6.74 seconds
vs
executions of straightforward_multiply() took 16.91 seconds
and
user 0m22.121s
vs
user 1m5.676s
.
FWIW, gcc-3.4.6 shows comparable to gcc-4.2.3 results, albeit slightly worse,
so it looks like the issue is very much gcc-4.3.0 specific.
I'll upload the test case.
--
Summary: severe perfromance degradation with "float complex" type
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergstesh at yahoo dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
@ 2008-03-26 19:24 ` sergstesh at yahoo dot com
2008-03-26 19:41 ` sergstesh at yahoo dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: sergstesh at yahoo dot com @ 2008-03-26 19:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sergstesh at yahoo dot com 2008-03-26 19:23 -------
Created an attachment (id=15383)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15383&action=view)
the test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
2008-03-26 19:24 ` [Bug c/35709] " sergstesh at yahoo dot com
@ 2008-03-26 19:41 ` sergstesh at yahoo dot com
2008-03-26 20:34 ` [Bug middle-end/35709] " rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: sergstesh at yahoo dot com @ 2008-03-26 19:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sergstesh at yahoo dot com 2008-03-26 19:40 -------
My system:
Linux amdam2 2.6.18.8-0.9-default #1 SMP Sun Feb 10 22:48:05 UTC 2008 i686
athlon i386 GNU/Linux
- SUSE 10.2, the CPU is: "AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
stepping 02".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
2008-03-26 19:24 ` [Bug c/35709] " sergstesh at yahoo dot com
2008-03-26 19:41 ` sergstesh at yahoo dot com
@ 2008-03-26 20:34 ` rguenth at gcc dot gnu dot org
2008-03-26 20:44 ` [Bug c/35709] " sergstesh at yahoo dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-26 20:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-03-26 20:33 -------
This was an intentional change for correctness. 4.3 uses the library
implementation to handle the case of NaNs correctly. Use -fcx-limited-range
if you want back the performance.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
` (2 preceding siblings ...)
2008-03-26 20:34 ` [Bug middle-end/35709] " rguenth at gcc dot gnu dot org
@ 2008-03-26 20:44 ` sergstesh at yahoo dot com
2008-03-26 20:46 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: sergstesh at yahoo dot com @ 2008-03-26 20:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sergstesh at yahoo dot com 2008-03-26 20:44 -------
(In reply to comment #3)
> This was an intentional change for correctness. 4.3 uses the library
> implementation to handle the case of NaNs correctly. Use -fcx-limited-range
> if you want back the performance.
>
Well, I'm using "float complex" for real time audio, so correctness of NaNs is
not an issue.
I think the default should have been the opposite. Why to break existing
applications ?
When "float" rather than "double" is used, it's most likely for non-sicentific
needs, so correctness in canse of NaNs most likely isn't an issue.
--
sergstesh at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
` (3 preceding siblings ...)
2008-03-26 20:44 ` [Bug c/35709] " sergstesh at yahoo dot com
@ 2008-03-26 20:46 ` pinskia at gcc dot gnu dot org
2008-03-26 20:58 ` sergstesh at yahoo dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-26 20:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-03-26 20:45 -------
As mentioned, use -fcx-limited-range.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
` (4 preceding siblings ...)
2008-03-26 20:46 ` pinskia at gcc dot gnu dot org
@ 2008-03-26 20:58 ` sergstesh at yahoo dot com
2008-03-26 22:23 ` rguenth at gcc dot gnu dot org
2008-03-30 20:29 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: sergstesh at yahoo dot com @ 2008-03-26 20:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from sergstesh at yahoo dot com 2008-03-26 20:58 -------
(In reply to comment #5)
> As mentioned, use -fcx-limited-range.
>
Can't you add just _one_ command line switch: -old_behavior ?
Or -gcc_4_2_3_behavior ?
For example, I need FFTW3 with "float" rather than "double", and I need its
speed. I am not sure FFTW3 'configure' will add -fcx-limited-range.
Thanks in advance.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
` (5 preceding siblings ...)
2008-03-26 20:58 ` sergstesh at yahoo dot com
@ 2008-03-26 22:23 ` rguenth at gcc dot gnu dot org
2008-03-30 20:29 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-26 22:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2008-03-26 22:22 -------
I would suggest for real time audio you should use -ffast-math which will
enable
-fcx-limited-range as well. It also disables generally handling of NaNs, Infs
and other optimization limiting things.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/35709] severe perfromance degradation with "float complex" type
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
` (6 preceding siblings ...)
2008-03-26 22:23 ` rguenth at gcc dot gnu dot org
@ 2008-03-30 20:29 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-30 20:29 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35709
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-03-30 20:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-26 19:23 [Bug c/35709] New: severe perfromance degradation with "float complex" type sergstesh at yahoo dot com
2008-03-26 19:24 ` [Bug c/35709] " sergstesh at yahoo dot com
2008-03-26 19:41 ` sergstesh at yahoo dot com
2008-03-26 20:34 ` [Bug middle-end/35709] " rguenth at gcc dot gnu dot org
2008-03-26 20:44 ` [Bug c/35709] " sergstesh at yahoo dot com
2008-03-26 20:46 ` pinskia at gcc dot gnu dot org
2008-03-26 20:58 ` sergstesh at yahoo dot com
2008-03-26 22:23 ` rguenth at gcc dot gnu dot org
2008-03-30 20:29 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).