This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: Interface method calls are slow.


Bryce McKinlay wrote:
> Why are interface calls so expensive compared to other calls in gcj?

Make sure your libgcj is newer than 11/04 or so... there was a nasty bug
in the method cache:

http://sourceware.cygnus.com/ml/java-discuss/1999-q4/msg00244.html

Can you run the code with profiling enabled in libgcj?  The method
counts will reveal the method cache hit ratio.

> It also appears that the private method call is not being inlined. I thought
> that gcj was inlining private methods now?

The DECL_INLINE patches are now in, but they don't seem to help without
also patching gcc/calls.c:

http://sourceware.cygnus.com/ml/java-discuss/1999-q4/msg00147.html

Methods currently can only be inlined if they are declared before they
are used.  Also, inlining (final, static) methods across class
boundaries does not yet seem to work.  Compiling with -Winline will list
candidate methods that could not be inlined.

--
Jeff Sturm
jsturm@sigma6.com

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