This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: GCC and Fortran eat GCJ for lunch at number crunching


On Thu, 2 Jan 2003, Erik Poupaert wrote:
> Is there any fundamental reason for gcj to be slower than equivalent
> (garbage-collected) C++?

Probably, but not often 3x slower.

The benchmark author used multidiensional arrays extensively in his C++
and Java code.  Statements like

        da  = a[np][0] + (a[np][1] + a[np][2] * t ) * t;

work very differently in the two languages.  (Although CSE should prevent
evaluting a[np] thrice, the array elements do not lie in contiguous
memory, affecting spatial locality).

I've also noticed GCC's register allocator struggles with large, complex
routines like in almabench.java.  Re-running the benchmark with -fnew-ra
on my PIII is good for about a %20 speedup.

Jeff


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