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: 4.0.0 JNI/reflection invocation 2/4/8 times as slow as in 3.3.3


Ranjit Mathew wrote:

Powers of 2 on a binary computer, and powers of
10 on a decimal computer (e.g. MIX), are not
kosher according to Knuth (and many others) - the
modulo operation just gives you the lower bits/digits
of the number.

That's a problem if the hash calculation gives you non-random lower-order bits. That's of course the case if addresses are used for hashes, as in an IdentityHashMap. But is it a problem in general - say with String.hashCode() ?

(This is stuff I really ought to know better ...)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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