This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Interface method calls are slow.
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: Interface method calls are slow.
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Tue, 16 Nov 1999 23:44:48 -0500
- CC: java-discuss at sourceware dot cygnus dot com
- Organization: sigma6
- References: <38322987.9D1D641D@albatross.co.nz>
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