On Fri, 16 May 2025 10:10:28 GMT, fabioromano1 wrote:
>> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you
>> please crosscheck?
>
>> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you
>> please crosscheck?
>
> @rgiulietti It seems there is a s
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
A minor change
-
Changes:
- all: https://g
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Use bitwise or instead of + in longValue()
-
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Some code simplifications for *ValueExact()
-
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Simplify two's complement in makePositive(int[])
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Avoid redundance of stripLeadingZeroInts()
-
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Small code simplifications
-
Changes:
- al
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Revert "Removed redundant code for choosing division's alg
On Tue, 20 May 2025 13:20:10 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Removed redundant code for choosing division's algorithm l
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Small code simplifications
-
Changes:
- al
On Fri, 16 May 2025 10:10:28 GMT, fabioromano1 wrote:
>> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you
>> please crosscheck?
>
>> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you
>> please crosscheck?
>
> @rgiulietti It seems there is a s
On Mon, 19 May 2025 17:34:16 GMT, Raffaello Giulietti
wrote:
>> Yes, but perhaps in the current version it's more clear what is the returned
>> value according to the condition.
>
> One could see the suggested variant as "return magBitLength(), except for a
> corrective term in case blah blah.
On Mon, 19 May 2025 17:16:58 GMT, fabioromano1 wrote:
>> I think the suggestion is fine.
>
> Yes, but perhaps in the current version it's more clear what is the returned
> value according to the condition.
One could see the suggested variant as "return magBitLength(), except for a
corrective t
On Mon, 19 May 2025 15:50:10 GMT, Raffaello Giulietti
wrote:
>> What is the usefulness of doing `int[] mag = this.mag;` at line 3856, since
>> `bitLength()` does not access to `static` fields and `BigInteger` is not
>> threadsafe, and therefore no race conditions occur?
>
> I think the suggest
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Removed numberOfTrailingZeros() as a duplicate of the cach
On Fri, 16 May 2025 13:30:01 GMT, fabioromano1 wrote:
>> src/java.base/share/classes/java/math/BigInteger.java line 3860:
>>
>>> 3858: && Integer.lowestOneBit(mag[0]) == mag[0]
>>> 3859: && numberOfTrailingZeroInts() == mag.length - 1
>>> 3860: ? magBi
On Mon, 19 May 2025 15:03:51 GMT, Raffaello Giulietti
wrote:
>> src/java.base/share/classes/java/math/BigInteger.java line 5034:
>>
>>> 5032: */
>>> 5033: private byte[] magSerializedForm() {
>>> 5034: byte[] result = new byte[(magBitLength() + 7) >>> 3];
>>
>> I think there's
On Mon, 19 May 2025 15:02:57 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> An optimization
>
> src/java.base/share/classes/java/math/BigInteger.java line 5034:
>
>> 5032: */
>> 503
On Fri, 16 May 2025 11:10:12 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
On Thu, 15 May 2025 22:43:54 GMT, Shaojin Wen wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> make magBitLength() an instance method
>
> src/java.base/share/classes/java/math/BigInteger.java line 3860:
>
>> 3858:
On Thu, 15 May 2025 15:37:39 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
On Fri, 16 May 2025 11:43:18 GMT, fabioromano1 wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> make magBitLength() an instance method
>
> src/java.base/share/classes/java/math/BigInteger.java line 3619:
>
>> 3617:
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
An optimization
-
Changes:
- all: https://
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Correct bug in shiftRight
-
Changes:
- all
On Thu, 15 May 2025 22:03:40 GMT, Raffaello Giulietti
wrote:
> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you
> please crosscheck?
@rgiulietti It seems there is a slowdown in the creation of large
pseudoprimes, maybe due to `BitSieve` methods.
-
PR C
On Thu, 15 May 2025 15:37:39 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
On Thu, 15 May 2025 15:37:39 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
make magBitLength() an instance method
-
Cha
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Make javaIncrement(int[]) static
-
Changes:
On Tue, 13 May 2025 21:24:08 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
On Thu, 15 May 2025 13:51:29 GMT, Raffaello Giulietti
wrote:
> It cannot be made an instance method, though. There's one usage which needs a
> static invocation.
@rgiulietti If you are referring to [this
invocation](https://github.com/fabioromano1/jdk/blob/5ad26a14049e1765d9ef46f307d723dd4b31
On Tue, 13 May 2025 21:24:08 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
On Thu, 15 May 2025 13:35:29 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Update names
>
> Since you are at it, I'd suggest changing `javaIncrement` to be `static` (no
> need to change
On Tue, 13 May 2025 21:24:08 GMT, fabioromano1 wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> fabioromano1 has updated the pull request incrementally with one additional
> commit since the last revision
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Update names
-
Changes:
- all: https://git
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
Same optimization of previous commit
-
Chang
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
fabioromano1 has updated the pull request incrementally with one additional
commit since the last revision:
An optimization
-
Changes:
- all: https://
On Sun, 11 May 2025 16:08:25 GMT, fabioromano1 wrote:
>> src/java.base/share/classes/java/math/BigInteger.java line 2828:
>>
>>> 2826: * assuming there are no leading zero ints.
>>> 2827: */
>>> 2828: private static int bitLength(int[] val, int len) {
>>
>> This should really be r
On Sun, 11 May 2025 16:12:38 GMT, fabioromano1 wrote:
>>> This should really be refactored to an instance method `bitLengthUnsigned`
>>> or `magBitCount`
>>
>> I would prefer `magBitLength` as a name, since `bitCount` is usually
>> referred to one's bit count. But before do this, I'd hear the
On Sun, 11 May 2025 16:00:55 GMT, Chen Liang wrote:
> This should really be refactored to an instance method `bitLengthUnsigned` or
> `magBitCount`
I would prefer `magBitLength` as a name, since `bitCount` is usually referred
to one's bit count. But before do this, I'd hear the opinion of @rgi
On Sat, 10 May 2025 16:41:17 GMT, fabioromano1 wrote:
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
src/java.base/share/classes/java/math/BigInteger.java line 2828:
> 2826: * assuming there are no leading zer
On Mon, 12 May 2025 01:46:25 GMT, David Schlosnagle wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> src/java.base/share/classes/java/math/BigInteger.java line 2642:
>
>> 2640: }
>> 2641:
On Mon, 12 May 2025 01:52:51 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/math/BigInteger.java line 2642:
>>
>>> 2640: }
>>> 2641: // (this.abs().bitLength() - 1L) * exponent + 1L >
>>> Integer.MAX_VALUE
>>> 2642: if (scaleFactor + bitsToShift - exponent >=
On Mon, 12 May 2025 13:45:08 GMT, fabioromano1 wrote:
>> @fabioromano1 While reviewers can of course file JBS issues on behalf of
>> contributors, the recommende way is for the latter to file a [bug
>> report](https://bugreport.java.com/bugreport/), as they know what they will
>> work on bette
On Sat, 10 May 2025 16:41:17 GMT, fabioromano1 wrote:
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
src/java.base/share/classes/java/math/BigInteger.java line 2642:
> 2640: }
> 2641: // (this.abs()
On Sat, 10 May 2025 16:41:17 GMT, fabioromano1 wrote:
> Some changes in `Biginteger`s' bit operations that increase the code
> readability and slightly optimize the execution time.
@fabioromano1 While reviewers can of course file JBS issues on behalf of
contributors, the recommende way is for
On Mon, 12 May 2025 13:13:36 GMT, Raffaello Giulietti
wrote:
>> Some changes in `Biginteger`s' bit operations that increase the code
>> readability and slightly optimize the execution time.
>
> @fabioromano1 While reviewers can of course file JBS issues on behalf of
> contributors, the recomme
Some changes in `Biginteger`s' bit operations that increase the code
readability and slightly optimize the execution time.
-
Commit messages:
- More clear comment
- An optimization
- Code simplification
- Code simplification
- Avoiding redundant code
- Code simplification
- Co
49 matches
Mail list logo