Review CR #6611830: UUID thread-safety and performance improvements
Alan.Bateman at oracle.com
Wed Feb 23 14:03:12 UTC 2011
Mike Duigou wrote:
> Daniel Aioanei reported via Josh Bloch a data race issue with the UUID accessor and hashCode() methods. I've prepared a webrev with the suggested changes:
> I've tested the change against the standard UUID tests and did a microbenchmark test of one method, variant(), to see what impact not caching had on performance. Since there was only negligible change in performance vs. the existing UUID implementation I am comfortable with eliminating the cache values. It would appear that a field access plus a shift is not a significant cost over a field access.
This looks good to me, but I had to pause on the variant method to prove
to myself that it's right - I don't know if a comment would help there.
More information about the core-libs-dev