Hashtable's and the tale of runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Andrew" == Andrew Haley <aph@xxxxxxxxxx> writes:

Andrew> There are things that we can try, such a using a better way to turn an
Andrew> address into a hash.

At some point we changed libgcj's hash function to this:

  // This was chosen to yield relatively well distributed results on
  // both 32- and 64-bit architectures.  Note 0x7fffffff is prime.
  return (jint) ((unsigned long) obj % 0x7fffffff);

It used to simply return the address.  I think we were having trouble
because it was losing all the upper bits on 64 bit platforms.

As far as I know we haven't looked into how effective, or not, this is
(on different workloads, etc... I don't remember hearing about
Hashtable showing up in a profile before).

Twisti, if you try it out, let us know :-)

Tom


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux