Scaling problem of HashMap (introduced with alternative hashing)
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Dec 27 19:38:49 UTC 2012
Looks very like dumb inlined java.util.Random?
Is there a security threat to use ThreadLocalRandom instead there?
-Aleksey.
On 27.12.2012, at 23:16, Zhong Yu <zhong.j.yu at gmail.com> wrote:
> Reported by the SO question
>
> http://stackoverflow.com/questions/14010906
>
> the HashMap constructor contains a CAS, which is kind of surprising.
> Could it be removed?
>
> transient final int hashSeed =
> sun.misc.Hashing.randomHashSeed(this); // CAS
>
> Zhong Yu
More information about the core-libs-dev
mailing list