public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
@ 2003-07-12  4:37 ` neroden at gcc dot gnu dot org
  2003-07-16 11:28 ` jacques dot bouchard at onera dot fr
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-12  4:37 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From neroden at gcc dot gnu dot org  2003-07-12 04:37 -------
Could you try again with 3.3 or mainline?  As usual, there have been lots of changes.  For that matter, try again with the new JDK, which is 
reportedly slower.  (heh).


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

* [Bug optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
  2003-07-12  4:37 ` [Bug optimization/1046] gcc less efficient than jdk for recursion! neroden at gcc dot gnu dot org
@ 2003-07-16 11:28 ` jacques dot bouchard at onera dot fr
  2003-11-10  7:55 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: jacques dot bouchard at onera dot fr @ 2003-07-16 11:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From jacques dot bouchard at onera dot fr  2003-07-16 11:28 -------
Subject: Re:  gcc less efficient than jdk for recursion!

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

> ------- Additional Comments From neroden at gcc dot gnu dot org  2003-07-12 04:37 -------
> Could you try again with 3.3 or mainline?  As usual, there have been lots of changes.
> For that matter, try again with the new JDK, which is reportedly slower.  (heh).

Here are my new results:

GCC 3.2.2 (Slackware's) :
=========================

gcc -v
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/3.2.2/specs
Configured with: ../gcc-3.2.2/configure --prefix=/usr --enable-shared --enable-threads=posix 
--enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i386-slackware-linux 
--host=i386-slackware-linux
Thread model: posix
gcc version 3.2.2

gcc -O2 -s fib.c -o fib (as in 1st report):

\time fib
267914296
18.50user 0.00system 0:18.51elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (79major+10minor)pagefaults 0swaps

gcc -O2 -fomit-frame-pointer -s fib.c -o fib :

\time fib
267914296
17.77user 0.01system 0:17.77elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (79major+10minor)pagefaults 0swaps

GCC 3.3 :
=========

gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: /home/bouchard/gcc-3.3/configure --enable-languages=c,c++,f77 --prefix=/usr
Thread model: posix
gcc version 3.3

gcc -O2 -s fib.c -o fib (as in 1st report):

\time fib
267914296
18.30user 0.01system 0:18.30elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (79major+10minor)pagefaults 0swaps

gcc -O2 -fomit-frame-pointer -s fib.c -o fib :

\time fib
267914296
16.28user 0.01system 0:16.28elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (79major+10minor)pagefaults 0swaps

J2SDK1.4.2 :
============

java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

javac -target 1.4 -g:none -O Fib.java :

\time java Fib 1
1
0.25user 0.03system 0:00.28elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1267major+537minor)pagefaults 0swaps

\time java Fib
267914296
16.07user 0.06system 0:16.17elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1350major+548minor)pagefaults 0swaps

ENVIRONMENT :
=============

Laptop Dell with Pentium III 500 MHz & 128 MB (same hardware as in 1st report)
Linux Slackware 9.0 (kernel 2.4.20 + glibc 2.3.1)

CONCLUSION :
============

The C code is 24% faster ((1-16.28/21.36)*100) than in the 1st report.
The Java Code is 7.7% faster ((1-(16.17-0.28)/(17.83-0.61))*100) than in the 1st report.

The Java code is now only 2.4% faster ((1-(16.17-0.28)/16.28)*100) than the C one.

'-fomit-frame-pointer' is clearly useful with GCC 3.3.
BTW, in gcc-info, that option is said to be "Enabled at levels `-O', `-O2', `-O3', `-Os'"
which is obviously false for i386.

NOTE: only the best times from several runs are shown in this report.


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

* [Bug optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
  2003-07-12  4:37 ` [Bug optimization/1046] gcc less efficient than jdk for recursion! neroden at gcc dot gnu dot org
  2003-07-16 11:28 ` jacques dot bouchard at onera dot fr
@ 2003-11-10  7:55 ` pinskia at gcc dot gnu dot org
  2003-12-21 17:18 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-10  7:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-10 07:55 -------
Note the code at least on powerp-apple-darwin produced by the Java's JIT is the same 
as GCC produces, so what that means is that the initial execution is faster than any code 
done by GCC.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-10 07:55:45
               date|                            |


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


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

* [Bug optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (2 preceding siblings ...)
  2003-11-10  7:55 ` pinskia at gcc dot gnu dot org
@ 2003-12-21 17:18 ` pinskia at gcc dot gnu dot org
  2003-12-26  3:30 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-21 17:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-21 17:03 -------
This patch should improve it: <http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00864.html>, at 
least with the testcase and some otherones too.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (3 preceding siblings ...)
  2003-12-21 17:18 ` pinskia at gcc dot gnu dot org
@ 2003-12-26  3:30 ` pinskia at gcc dot gnu dot org
  2004-03-03  6:02 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-26  3:30 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


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

* [Bug optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (4 preceding siblings ...)
  2003-12-26  3:30 ` pinskia at gcc dot gnu dot org
@ 2004-03-03  6:02 ` pinskia at gcc dot gnu dot org
  2004-05-24  7:02 ` [Bug tree-optimization/1046] " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-03  6:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-03 06:02 -------
Well at -O3 -fno-inline this is fixed but at -O3 -finline this is not fixed, the problem is that 
fib is being inlined into itself why I do not know.  Jan why is this happening?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (5 preceding siblings ...)
  2004-03-03  6:02 ` pinskia at gcc dot gnu dot org
@ 2004-05-24  7:02 ` pinskia at gcc dot gnu dot org
  2005-02-08 17:09 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24  7:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (6 preceding siblings ...)
  2004-05-24  7:02 ` [Bug tree-optimization/1046] " pinskia at gcc dot gnu dot org
@ 2005-02-08 17:09 ` steven at gcc dot gnu dot org
  2005-02-14  0:36 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-02-08 17:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-02-08 10:14 -------
Honza, this is one we should catch on the tree-profiling branch now.

-- 


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (7 preceding siblings ...)
  2005-02-08 17:09 ` steven at gcc dot gnu dot org
@ 2005-02-14  0:36 ` pinskia at gcc dot gnu dot org
  2005-05-15  1:07 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-14  0:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-13 18:17 -------
*** Bug 19939 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |falk at debian dot org


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (8 preceding siblings ...)
  2005-02-14  0:36 ` pinskia at gcc dot gnu dot org
@ 2005-05-15  1:07 ` pinskia at gcc dot gnu dot org
  2005-07-23 19:51 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-15  1:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2005-01-05 02:24:56         |2005-05-15 01:05:30
               date|                            |


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (9 preceding siblings ...)
  2005-05-15  1:07 ` pinskia at gcc dot gnu dot org
@ 2005-07-23 19:51 ` pinskia at gcc dot gnu dot org
  2005-07-23 19:59 ` gdr at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23 19:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-23 19:30 -------
*** Bug 22633 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |TazForEver at dlfp dot org


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (10 preceding siblings ...)
  2005-07-23 19:51 ` pinskia at gcc dot gnu dot org
@ 2005-07-23 19:59 ` gdr at gcc dot gnu dot org
  2005-07-23 20:04 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 15+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-07-23 19:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-07-23 19:50 -------
Bug 22633 has been marked duplicate of this, but that is a bit of strech.

However, the stituation has elvolved since 2.95.2 and GCC is now able to 
detected some forms ofrecursion as real loops.  What this bug must describe
now, is GCC's ability to optimize certain recrusions correctly at low-level
optimations and completely miss the spot at higher level.
I'm turning this PR into an minor PR, given the current behaviour, and
change the "report against" -- apparently there is no point in opening
a new PR since Andrew would qyikcly close them as duplicate of this.

-- Gaby

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |minor
            Version|2.95.2                      |4.1.0


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (11 preceding siblings ...)
  2005-07-23 19:59 ` gdr at gcc dot gnu dot org
@ 2005-07-23 20:04 ` pinskia at gcc dot gnu dot org
  2005-07-24  3:01 ` gdr at integrable-solutions dot net
  2005-07-24  3:22 ` gdr at gcc dot gnu dot org
  14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23 20:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-23 19:59 -------
(In reply to comment #11)
> Bug 22633 has been marked duplicate of this, but that is a bit of strech.

If you had read comment #7 and #8, you will notice that this is the same bug and really still an 
enhancement.

There is nothing new in PR 22633 which really warranted a new bug as this bug has every thing 
mentioned here already and has been known since March of last year.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (12 preceding siblings ...)
  2005-07-23 20:04 ` pinskia at gcc dot gnu dot org
@ 2005-07-24  3:01 ` gdr at integrable-solutions dot net
  2005-07-24  3:22 ` gdr at gcc dot gnu dot org
  14 siblings, 0 replies; 15+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-07-24  3:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2005-07-24 03:01 -------
Subject: Re:  gcc less efficient than jdk for recursion!

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-23 19:59 -------
| (In reply to comment #11)
| > Bug 22633 has been marked duplicate of this, but that is a bit of strech.
| 
| If you had read comment #7 and #8,

Please do assume that I read those comments.  Do you evidence that I
did not?

You seem to this idea that if people don't agree with you, then it
must because they did not read comments.  You should change perspective.

-- Gaby


-- 


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


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

* [Bug tree-optimization/1046] gcc less efficient than jdk for recursion!
       [not found] <20001212025602.1046.bouchard@onera.fr>
                   ` (13 preceding siblings ...)
  2005-07-24  3:01 ` gdr at integrable-solutions dot net
@ 2005-07-24  3:22 ` gdr at gcc dot gnu dot org
  14 siblings, 0 replies; 15+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-07-24  3:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-07-24 03:01 -------
.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |minor
            Version|4.1.0                       |2.95.2


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


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

end of thread, other threads:[~2005-07-24  3:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20001212025602.1046.bouchard@onera.fr>
2003-07-12  4:37 ` [Bug optimization/1046] gcc less efficient than jdk for recursion! neroden at gcc dot gnu dot org
2003-07-16 11:28 ` jacques dot bouchard at onera dot fr
2003-11-10  7:55 ` pinskia at gcc dot gnu dot org
2003-12-21 17:18 ` pinskia at gcc dot gnu dot org
2003-12-26  3:30 ` pinskia at gcc dot gnu dot org
2004-03-03  6:02 ` pinskia at gcc dot gnu dot org
2004-05-24  7:02 ` [Bug tree-optimization/1046] " pinskia at gcc dot gnu dot org
2005-02-08 17:09 ` steven at gcc dot gnu dot org
2005-02-14  0:36 ` pinskia at gcc dot gnu dot org
2005-05-15  1:07 ` pinskia at gcc dot gnu dot org
2005-07-23 19:51 ` pinskia at gcc dot gnu dot org
2005-07-23 19:59 ` gdr at gcc dot gnu dot org
2005-07-23 20:04 ` pinskia at gcc dot gnu dot org
2005-07-24  3:01 ` gdr at integrable-solutions dot net
2005-07-24  3:22 ` gdr 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).