[Bug tree-optimization/1046] gcc less efficient than jdk for recursion with -finline-functions

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Apr 22 12:19:00 GMT 2007



------- Comment #17 from rguenth at gcc dot gnu dot org  2007-04-22 13:19 -------
This looks fixed - we eliminate the tail recursion for Fib(n-1).

/usr/bin/time /usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/bin/java Fib
267914296
3.97user 0.02system 0:04.02elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1major+2870minor)pagefaults 0swaps

gcc 4.1 -O3:
/usr/bin/time ./fib
267914296
1.86user 0.00system 0:01.89elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+116minor)pagefaults 0swaps


-- 


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



More information about the Gcc-bugs mailing list