[LLVMbugs] [Bug 6931] New: Substandard performance of fibonacci example code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 25 02:21:19 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6931
Summary: Substandard performance of fibonacci example code
Product: new-bugs
Version: 2.6
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: yuri at tsoft.com
CC: llvmbugs at cs.uiuc.edu
I compiled this simple example:
#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));
}
with llvm-2.6 with gcc frontend.
Runtime with argument 45 is ~4.3sec.
Runtime of mainstream gcc compiled code is always below 4 sec (3.4-3.9sec).
This is a very basic example and should produce a very optimal code.
Intel(R) Core(TM) i7 CPU @ 9200 @ 2.67GHz
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list