This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: libgcj performance: _Jv_LookupInterfaceMethod
- To: Jeff Sturm <jsturm at sigma6 dot com>
- Subject: Re: libgcj performance: _Jv_LookupInterfaceMethod
- From: Kresten Krab Thorup <krab at daimi dot au dot dk>
- Date: 17 Nov 1999 16:22:51 +0100
- Cc: java-discuss at sourceware dot cygnus dot com
- References: <3821C65A.F00618DA@sigma6.com>
So,
I think that you should be using `%' and not `&' to limit the hash
code to be in the method cache index range. Using `&' only makes
sense if the range is a power of two (minus one).
The bug in the original code was (I believe), that I forgot to reset
method_cache_count after it was cleaned out. It should have been set
back down to zero (in _Jv_AddMethodToCache). My hunch is, that fixing
this bug will make it perform better than what's there now.
At the very least, try replacing the `&' with `%'.
-- Kresten
Kresten Krab Thorup "I like my eggs ploded"
Department of Computer Science, University of Aarhus
Aabogade 34, DK-8200 Aarhus N, Denmark
+45 8942 5665 (office), +45 2343 4626 (mobile)