This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/43884] New: Performance degradation of the simple example (fibonacci) 4.3.3->4.5.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]