<i18n dev> RFR: 8263090: Avoid reading volatile fields twice in Locale.getDefault(Category) [v2]

David Holmes dholmes at openjdk.java.net
Sat Mar 6 12:39:07 UTC 2021

On Fri, 5 Mar 2021 18:58:44 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>   Fix omitted synchronized
> Looks good.

If I read the order right your benchmark findings were done before you added the missing synchronized - correct?

AFAICS the only unnecessary volatile read is on the return statement and you could fix that without doing the other refactoring. I don't see how introducing an extra method call can aid performance.


PR: https://git.openjdk.java.net/jdk/pull/2845

More information about the i18n-dev mailing list