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: libgcj performance: _Jv_LookupInterfaceMethod


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)

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