On Wed, 13 Jul 2022 15:32:18 GMT, Сергей Цыпанов wrote:
>> `BigInteger.powerCache` is volatile and should be assigned only once in
>> static initializer.
>
> Сергей Цыпанов has updated the pull request incrementally with one additional
> commit since the last revision:
>
> 8290079: Rename lo
On Wed, 13 Jul 2022 15:32:18 GMT, Сергей Цыпанов wrote:
>> `BigInteger.powerCache` is volatile and should be assigned only once in
>> static initializer.
>
> Сергей Цыпанов has updated the pull request incrementally with one additional
> commit since the last revision:
>
> 8290079: Rename lo
On Wed, 13 Jul 2022 15:00:07 GMT, Roger Riggs wrote:
>> Сергей Цыпанов has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8290079: Rename local var
>
> src/java.base/share/classes/java/math/BigInteger.java line 1276:
>
>> 1274: *
> `BigInteger.powerCache` is volatile and should be assigned only once in
> static initializer.
Сергей Цыпанов has updated the pull request incrementally with one additional
commit since the last revision:
8290079: Rename local var
-
Changes:
- all: https://git.openjdk.org/jdk
On Mon, 11 Jul 2022 12:41:48 GMT, Сергей Цыпанов wrote:
> `BigInteger.powerCache` is volatile and should be assigned only once in
> static initializer.
src/java.base/share/classes/java/math/BigInteger.java line 1276:
> 1274: * on demand.
> 1275: */
> 1276: BigInteger[
On Tue, 12 Jul 2022 21:16:23 GMT, Сергей Цыпанов wrote:
>> Usually yes, but since a static initializer is executed by at most one
>> thread by using a locking protocol before any other static code is ever
>> executed, the runtime _could_ (but I'm not sure it it really does) treat the
>> volati
On Tue, 12 Jul 2022 09:18:19 GMT, Raffaello Giulietti wrote:
>> `BigInteger.powerCache` is volatile and should be assigned only once in
>> static initializer.
>
> Usually yes, but since a static initializer is executed by at most one thread
> by using a locking protocol before any other static
On Mon, 11 Jul 2022 12:41:48 GMT, Сергей Цыпанов wrote:
> `BigInteger.powerCache` is volatile and should be assigned only once in
> static initializer.
Usually yes, but since a static initializer is executed by at most one thread
by using a locking protocol before any other static code is ever
On Tue, 12 Jul 2022 08:35:50 GMT, Raffaello Giulietti wrote:
>> `BigInteger.powerCache` is volatile and should be assigned only once in
>> static initializer.
>
> (Not a reviewer) While the change doesn't hurt, I doubt that access to a
> (static) volatile in a static initializer is ever contend
On Mon, 11 Jul 2022 12:41:48 GMT, Сергей Цыпанов wrote:
> `BigInteger.powerCache` is volatile and should be assigned only once in
> static initializer.
(Not a reviewer) While the change doesn't hurt, I doubt that access to a
(static) volatile in a static initializer is ever contended.
---
On Mon, 11 Jul 2022 12:41:48 GMT, Сергей Цыпанов wrote:
> `BigInteger.powerCache` is volatile and should be assigned only once in
> static initializer.
The change looks fine to me. Please wait for at least another review from
someone more familiar with this area, before merging.
-
`BigInteger.powerCache` is volatile and should be assigned only once in static
initializer.
-
Commit messages:
- 8290079: Reduce interaction with volatile in static initializer of BigInteger
Changes: https://git.openjdk.org/jdk/pull/9451/files
Webrev: https://webrevs.openjdk.org/?
12 matches
Mail list logo