public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49485] New: Performance problem with C++ code
@ 2011-06-21 12:37 ismail at namtrac dot org
  2011-06-21 12:38 ` [Bug c++/49485] " ismail at namtrac dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: ismail at namtrac dot org @ 2011-06-21 12:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

           Summary: Performance problem with C++ code
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ismail@namtrac.org


Created attachment 24570
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24570
Testcase

Attached testcase when compiled with gcc 4.3.4;


> g++ -O3 -ffast-math -o reduced_dlasr_gcc43 reduced_dlasr.cpp 

> time ./reduced_dlasr_gcc43
./reduced_dlasr_gcc43  0.15s user 0.00s system 94% cpu 0.168 total

When compiled with gcc 4.6;

> g++ -O3 -ffast-math -o reduced_dlasr_gcc46 reduced_dlasr.cpp

> time ./reduced_dlasr_gcc46
./reduced_dlasr_gcc46  0.20s user 0.00s system 99% cpu 0.209 total


gcc versions:

gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) 
gcc version 4.6.0 20110607 [gcc-4_6-branch revision 174741] (SUSE Linux)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
@ 2011-06-21 12:38 ` ismail at namtrac dot org
  2011-09-23 21:58 ` paolo.carlini at oracle dot com
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ismail at namtrac dot org @ 2011-06-21 12:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #1 from İsmail "cartman" Dönmez <ismail at namtrac dot org> 2011-06-21 12:37:49 UTC ---
Test machine has Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz CPU with 8GB of RAM.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
  2011-06-21 12:38 ` [Bug c++/49485] " ismail at namtrac dot org
@ 2011-09-23 21:58 ` paolo.carlini at oracle dot com
  2011-10-20  1:02 ` paolo.carlini at oracle dot com
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 21:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-23 21:54:15 UTC ---
Richard, maybe you are interested in triaging this.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug c++/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
  2011-06-21 12:38 ` [Bug c++/49485] " ismail at namtrac dot org
  2011-09-23 21:58 ` paolo.carlini at oracle dot com
@ 2011-10-20  1:02 ` paolo.carlini at oracle dot com
  2011-10-20  1:08 ` [Bug target/49485] " pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-20  1:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-20 01:02:10 UTC ---
Adding Jakub too, I'm not sure about the best way to handle this one.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (2 preceding siblings ...)
  2011-10-20  1:02 ` paolo.carlini at oracle dot com
@ 2011-10-20  1:08 ` pinskia at gcc dot gnu.org
  2011-10-20  1:09 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-10-20  1:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Target|                            |i?86-*-*
          Component|c++                         |target

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-10-20 01:08:13 UTC ---
The slow down only happens on x86 and not x86_64.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (3 preceding siblings ...)
  2011-10-20  1:08 ` [Bug target/49485] " pinskia at gcc dot gnu.org
@ 2011-10-20  1:09 ` pinskia at gcc dot gnu.org
  2011-10-20  1:15 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-10-20  1:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-10-20 01:09:02 UTC ---
apinski@apinskidesktop:~$ g++ t.cc -O3 -ffast-math
apinski@apinskidesktop:~$ ./a.out
apinski@apinskidesktop:~$ time ./a.out

real    0m0.329s
user    0m0.328s
sys    0m0.000s
apinski@apinskidesktop:~$ ~/local-gcc/bin/g++ t.cc -O3 -ffast-math
apinski@apinskidesktop:~$ time ./a.out

real    0m0.313s
user    0m0.312s
sys    0m0.000s
apinski@apinskidesktop:~$ ~/local-gcc/bin/g++ t.cc -O3 -ffast-math -m32
apinski@apinskidesktop:~$ time ./a.out

real    0m0.528s
user    0m0.384s
sys    0m0.008s
apinski@apinskidesktop:~$ g++ t.cc -O3 -ffast-math -m32
apinski@apinskidesktop:~$ time ./a.out

real    0m0.471s
user    0m0.464s
sys    0m0.008s
--- CUT ---
gcc version 4.7.0 20111005 (experimental) [trunk revision 179579] (GCC) 
gcc version 4.4.5 (Debian 4.4.5-8)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (4 preceding siblings ...)
  2011-10-20  1:09 ` pinskia at gcc dot gnu.org
@ 2011-10-20  1:15 ` pinskia at gcc dot gnu.org
  2011-10-20  7:38 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-10-20  1:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-10-20 01:13:54 UTC ---
Looks like vectorizer is causing the slow down at least for me on the trunk
that is -mno-sse makes the slowdown go away.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (5 preceding siblings ...)
  2011-10-20  1:15 ` pinskia at gcc dot gnu.org
@ 2011-10-20  7:38 ` jakub at gcc dot gnu.org
  2011-10-20  7:58 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-20  7:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-20 07:36:40 UTC ---
For me the trunk with vectorization is certainly faster than 4.3, it is true
that 4.6 is slower.

4.3 -O3 -ffast-math 0m0.144s
4.3 -O3 -ffast-math -fno-tree-vectorize 0m0.167s
4.6 -O3 -ffast-math 0m0.194s
4.6 -O3 -ffast-math -fno-tree-vectorize 0m0.195s
4.6 -O3 -ffast-math -mavx 0m0.181s
trunk -O3 -ffast-math 0m0.127s
trunk -O3 -ffast-math -fno-tree-vectorize 0m0.176s
trunk -O3 -ffast-math -mavx 0m0.071s


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (6 preceding siblings ...)
  2011-10-20  7:38 ` jakub at gcc dot gnu.org
@ 2011-10-20  7:58 ` jakub at gcc dot gnu.org
  2011-10-20  8:20 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-20  7:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-20 07:57:10 UTC ---
BTW, 4.6 numbers can be improved to the trunk numbers by applying
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179460
(aka a subset of Eric's r179165 change) - C++ references here prevent the
vectorization of one of the loops.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (7 preceding siblings ...)
  2011-10-20  7:58 ` jakub at gcc dot gnu.org
@ 2011-10-20  8:20 ` paolo.carlini at oracle dot com
  2011-10-20  8:44 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-20  8:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-20 08:19:28 UTC ---
Ah great. Then I wonder if at this point we couldn't even resolve this..


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (8 preceding siblings ...)
  2011-10-20  8:20 ` paolo.carlini at oracle dot com
@ 2011-10-20  8:44 ` jakub at gcc dot gnu.org
  2011-10-20  9:28 ` [Bug target/49485] [4.6 Regression] " paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-20  8:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-20 08:42:55 UTC ---
Certainly not right now, this isn't a kind of change that should be added in
between 4.6.2-RC and 4.6.2.  Maybe later.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] [4.6 Regression] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (9 preceding siblings ...)
  2011-10-20  8:44 ` jakub at gcc dot gnu.org
@ 2011-10-20  9:28 ` paolo.carlini at oracle dot com
  2011-10-27  9:42 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-20  9:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-20
            Summary|Performance problem with    |[4.6 Regression]
                   |C++ code                    |Performance problem with
                   |                            |C++ code
     Ever Confirmed|0                           |1

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-20 09:27:32 UTC ---
Of course, assuming you actually mean to backport something. Thanks again.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] [4.6 Regression] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (10 preceding siblings ...)
  2011-10-20  9:28 ` [Bug target/49485] [4.6 Regression] " paolo.carlini at oracle dot com
@ 2011-10-27  9:42 ` rguenth at gcc dot gnu.org
  2012-03-01 14:56 ` jakub at gcc dot gnu.org
  2013-04-12 16:18 ` jakub at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-27  9:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.3


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] [4.6 Regression] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (11 preceding siblings ...)
  2011-10-27  9:42 ` rguenth at gcc dot gnu.org
@ 2012-03-01 14:56 ` jakub at gcc dot gnu.org
  2013-04-12 16:18 ` jakub at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 14:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.3                       |4.6.4

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:38:43 UTC ---
GCC 4.6.3 is being released.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug target/49485] [4.6 Regression] Performance problem with C++ code
  2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
                   ` (12 preceding siblings ...)
  2012-03-01 14:56 ` jakub at gcc dot gnu.org
@ 2013-04-12 16:18 ` jakub at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:18 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49485

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.0

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:17:48 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.0.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-04-12 16:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 12:37 [Bug c++/49485] New: Performance problem with C++ code ismail at namtrac dot org
2011-06-21 12:38 ` [Bug c++/49485] " ismail at namtrac dot org
2011-09-23 21:58 ` paolo.carlini at oracle dot com
2011-10-20  1:02 ` paolo.carlini at oracle dot com
2011-10-20  1:08 ` [Bug target/49485] " pinskia at gcc dot gnu.org
2011-10-20  1:09 ` pinskia at gcc dot gnu.org
2011-10-20  1:15 ` pinskia at gcc dot gnu.org
2011-10-20  7:38 ` jakub at gcc dot gnu.org
2011-10-20  7:58 ` jakub at gcc dot gnu.org
2011-10-20  8:20 ` paolo.carlini at oracle dot com
2011-10-20  8:44 ` jakub at gcc dot gnu.org
2011-10-20  9:28 ` [Bug target/49485] [4.6 Regression] " paolo.carlini at oracle dot com
2011-10-27  9:42 ` rguenth at gcc dot gnu.org
2012-03-01 14:56 ` jakub at gcc dot gnu.org
2013-04-12 16:18 ` jakub at gcc dot gnu.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).