On Fri, 5 Mar 2021 18:53:29 GMT, Claes Redestad wrote:
>> This patch refactors Locale.getDefault(Category) so that the volatile field
>> holding the Locale is typically only read once. This has a small performance
>> advantage, and might be more robust if initialization is racy.
>
> Claes Redes
: core-libs-dev on behalf of Sergey
Bylokhov
Sent: Saturday, March 6, 2021 9:39:07 PM
To: core-libs-dev@openjdk.java.net ;
i18n-...@openjdk.java.net
Subject: Re: RFR: 8263090: Avoid reading volatile fields twice in
Locale.getDefault(Category) [v2]
On Sat, 6 Mar 2021 13:34:14 GMT, Claes Re
On Sat, 6 Mar 2021 13:34:14 GMT, Claes Redestad wrote:
>> src/java.base/share/classes/java/util/Locale.java line 946:
>>
>>> 944: Locale loc = defaultDisplayLocale; // volatile read
>>> 945: if (loc == null) {
>>> 946: loc = getDisplayLocale();
>>
>> Just
On Sat, 6 Mar 2021 05:51:17 GMT, Sergey Bylokhov wrote:
>> Claes Redestad has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix omitted synchronized
>
> src/java.base/share/classes/java/util/Locale.java line 946:
>
>> 944: Loc
On Sat, 6 Mar 2021 12:36:02 GMT, David Holmes wrote:
> 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 re
On Fri, 5 Mar 2021 18:58:44 GMT, Naoto Sato 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
On Fri, 5 Mar 2021 18:53:29 GMT, Claes Redestad wrote:
>> This patch refactors Locale.getDefault(Category) so that the volatile field
>> holding the Locale is typically only read once. This has a small performance
>> advantage, and might be more robust if initialization is racy.
>
> Claes Redes
On Fri, 5 Mar 2021 18:53:29 GMT, Claes Redestad wrote:
>> This patch refactors Locale.getDefault(Category) so that the volatile field
>> holding the Locale is typically only read once. This has a small performance
>> advantage, and might be more robust if initialization is racy.
>
> Claes Redes
> This patch refactors Locale.getDefault(Category) so that the volatile field
> holding the Locale is typically only read once. This has a small performance
> advantage, and might be more robust if initialization is racy.
Claes Redestad has updated the pull request incrementally with one additio
On Fri, 5 Mar 2021 17:29:16 GMT, Naoto Sato wrote:
>> Claes Redestad has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix omitted synchronized
>
> src/java.base/share/classes/java/util/Locale.java line 959:
>
>> 957: }
>> 958:
>> 95
10 matches
Mail list logo