This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Slow recursive functions
On Fri, 2005-04-15 at 11:43 +0100, Andrew Haley wrote:
> That, and the calling convention. We use the x86 system calling
> convention throughout gcj, and this is slower than passing args in
> registers. There's also the possibility that some JITs might be
> optimized for this kind of benchmark.
Here are some x86 Linux results. java is 1.5, gcj is 4.0ish. Times are
best of three run real times.
Original Benchmark
0m10.825s java -server
0m36.277s gcj -O3 -march=i686 -mtune=pentium4
0m41.259s gcj -O3
0m44.348s java
0m50.497s gcj -O2 -march=i686 -mtune=pentium4
1m3.868s gcj -O2
Modified Benchmark (Ack method is private)
0m9.288s gcj -O3 -march=i686 -mtune=pentium4
0m9.431s gcj -O3
0m11.409s java -server
0m40.931s java
0m43.026s gcj -O2 -march=i686 -mtune=pentium4
0m44.210s gcj -O2
I think there are a number of well known optimizations we could
implement for gcj to produce the best "modified" results from the
original sources. But I'm really skeptical they would make any
difference on real word programs.
AG