RFR: 8221836: Avoid recalculating String.hash when zero

Claes Redestad claes.redestad at oracle.com
Mon Apr 8 11:00:54 UTC 2019


On 2019-04-08 12:28, Aleksey Shipilev wrote:
> Because the whole thing in current code is "benign data race" on hash field. Pulling in another
> field into race needs careful consideration if it breaks the benignity. It apparently does not, but
> the cognitive complexity involved in reading that code makes the minuscule benefit much more
> questionable.

Can some carefully worded comments in the vicinity ease your concern?

/Claes



More information about the hotspot-gc-dev mailing list