public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43884]  New: Performance degradation of the simple example (fibonacci) 4.3.3->4.5.0
@ 2010-04-25  7:18 yuri at tsoft dot com
  2010-04-26 18:55 ` [Bug target/43884] [4.4/4.5/4.6 Regression] Performance degradation for simple fibonacci numbers calculation hjl dot tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: yuri at tsoft dot com @ 2010-04-25  7:18 UTC (permalink / raw)
  To: gcc-bugs

I ran this simple example with the argument 45 through various versions of gcc
(option -O3):

#include <stdlib.h>
#include <stdio.h>

int fib(int AnArg) {
 if (AnArg <= 2) return (1);
 return (fib(AnArg-1)+fib(AnArg-2));
}

int main(int argc, char* argv[]) {
 int n = atoi(argv[1]);
 printf("fib(%i)=%i\n", n, fib(n));
}

Here are the average runtimes I got:
version    time
4.3.1      3.930s
4.3.2      3.500s
4.3.3      3.470s
4.4.1      3.930s
4.4.3      3.940s
4.5.0      3.860s

I ran ~10 samples so values are approximate, but it's quite obvious that 4.5.0
has very significant degradation compared to 4.3.3.

Is there a performance suite for gcc that is ran for each release, are results
available online?

This case is pretty simple, basic. I would expect gcc to produce quite optimal
code for it.


-- 
           Summary: Performance degradation of the simple example
                    (fibonacci) 4.3.3->4.5.0
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com


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


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

end of thread, other threads:[~2011-01-22 21:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43884-4@http.gcc.gnu.org/bugzilla/>
2010-10-01 12:08 ` [Bug target/43884] [4.4/4.5/4.6 Regression] Performance degradation for simple fibonacci numbers calculation jakub at gcc dot gnu.org
2011-01-22 17:31 ` hubicka at gcc dot gnu.org
2011-01-22 21:51 ` hubicka at gcc dot gnu.org
2011-01-22 21:59 ` hubicka at gcc dot gnu.org
2011-01-22 22:10 ` hubicka at gcc dot gnu.org
2010-04-25  7:18 [Bug c++/43884] New: Performance degradation of the simple example (fibonacci) 4.3.3->4.5.0 yuri at tsoft dot com
2010-04-26 18:55 ` [Bug target/43884] [4.4/4.5/4.6 Regression] Performance degradation for simple fibonacci numbers calculation hjl dot tools at gmail dot com
2010-04-29  1:21 ` hjl dot tools at gmail dot com
2010-04-29  2:20 ` hjl dot tools at gmail dot com
2010-04-29  9:27 ` hubicka at ucw dot cz
2010-04-30  9:01 ` jakub at gcc dot gnu dot org
2010-05-19 12:37 ` rguenth at gcc dot gnu dot org
2010-06-25 14:10 ` hjl dot tools at gmail dot com

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).