On Tue, 1 Oct 2024 14:21:19 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Tue, 1 Oct 2024 20:43:24 GMT, fabioromano1 wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Code simplification
>
> `/integrate`
@fabioromano1 Seems like your integration was not successful.
Retry without any fo
On Tue, 1 Oct 2024 14:21:19 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Tue, 1 Oct 2024 14:21:19 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Tue, 1 Oct 2024 14:21:19 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Tue, 1 Oct 2024 15:34:12 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Code simplification
>
> test/jdk/java/math/BigInteger/MutableBigIntegerShiftTests.java line 69:
>
>> 67: @M
On Tue, 1 Oct 2024 14:21:19 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Sat, 28 Sep 2024 07:30:18 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the
On Tue, 1 Oct 2024 09:02:36 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Small correction to ensure n > leadingZeros && nBits > leadingZeros
>
> test/jdk/java/math/BigInteger/MutableBig
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Thu, 12 Sep 2024 20:49:49 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the
On Tue, 3 Sep 2024 16:50:26 GMT, fabioromano1 wrote:
>>> > It would be nice to see some benchmarks where it gives performance
>>> > benefits.
>>>
>>> @kuksenko Try to run the benchmark of the `BigInteger`'s square root, maybe
>>> there the benefits are more visible...
>>
>> "maybe"
>> So,
On Tue, 3 Sep 2024 16:50:26 GMT, fabioromano1 wrote:
>>> > It would be nice to see some benchmarks where it gives performance
>>> > benefits.
>>>
>>> @kuksenko Try to run the benchmark of the `BigInteger`'s square root, maybe
>>> there the benefits are more visible...
>>
>> "maybe"
>> So,
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Thu, 12 Sep 2024 12:27:01 GMT, fabioromano1 wrote:
>> I mean something like
>>
>> private void primitiveRightShift(int n, int[] result, int resPos) {
>> int[] val = value;
>> int n2 = 32 - n;
>> int c = 0;
>> for (int i = 0; i < intLen; i++) {
>>
On Thu, 12 Sep 2024 12:21:59 GMT, Raffaello Giulietti
wrote:
>> So, a test should be done for every possible path of computation of
>> `MBI.leftShift()` method...
>
> Looking at the code of `leftShift()` alone, I roughly count a dozen or so
> paths.
> But if you feel confident that the random
On Thu, 12 Sep 2024 12:01:47 GMT, Raffaello Giulietti
wrote:
>> Yes, it could, but the problem is that in this way the precondition `(resPos
>> <= offset || resPos >= offset + intLen)` would be no longer correct, and in
>> particular `resPos <= offset` is used by `MBI.leftShift()` if `result =
On Thu, 12 Sep 2024 11:21:10 GMT, fabioromano1 wrote:
>> The implementation of the shift methods in `MutableBigInteger` has several
>> control flow paths, depending on whether a new `int[]` is needed, whether
>> `arraycopy()` can be used, etc.
>>
>> Relying on random tests is good if the "sear
On Thu, 12 Sep 2024 11:23:24 GMT, fabioromano1 wrote:
>> src/java.base/share/classes/java/math/MutableBigInteger.java line 722:
>>
>>> 720: * {@code (resPos <= offset || resPos >= offset + intLen)}.
>>> 721: */
>>> 722: private final void primitiveRightShift(int n, int[] result, in
On Thu, 12 Sep 2024 10:27:49 GMT, Raffaello Giulietti
wrote:
>> I see (with obvious adaptations and one more `case`).
>
> The implementation of the shift methods in `MutableBigInteger` has several
> control flow paths, depending on whether a new `int[]` is needed, whether
> `arraycopy()` can b
On Thu, 12 Sep 2024 10:29:24 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use supported annotation by jtreg in tests
>
> src/java.base/share/classes/java/math/MutableBigInteger.java lin
On Thu, 12 Sep 2024 10:27:39 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use supported annotation by jtreg in tests
>
> src/java.base/share/classes/java/math/MutableBigInteger.java lin
On Wed, 11 Sep 2024 15:34:44 GMT, Raffaello Giulietti
wrote:
>> The test cases of the code are the same of the test class for
>> `BigInteger.shiftLeft()`.
>
> I see (with obvious adaptations and one more `case`).
The implementation of the shift methods in `MutableBigInteger` has several
contr
On Wed, 11 Sep 2024 15:51:25 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Wed, 11 Sep 2024 12:44:54 GMT, fabioromano1 wrote:
>> test/jdk/java/math/BigInteger/MutableBigIntegerShiftTests.java line 153:
>>
>>> 151:
>>> 152: return result;
>>> 153: }
>>
>> I think this is getting too complex for a test, there's a risk that it is
>> incorrect...
>>
>> I
On Wed, 11 Sep 2024 14:23:40 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Wed, 11 Sep 2024 11:48:36 GMT, Raffaello Giulietti
wrote:
>> fabioromano1 has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Merge branch 'patchLeftShift' of https://github.com/fabioromano1/jdk into
>> patchLeftShift
>> - Removed re
On Sat, 7 Sep 2024 20:39:39 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Mon, 2 Sep 2024 16:19:01 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Mon, 2 Sep 2024 16:19:01 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Tue, 3 Sep 2024 16:29:10 GMT, Sergey Kuksenko wrote:
>>> It would be nice to see some benchmarks where it gives performance benefits.
>>
>> @kuksenko Try to run the benchmark of the `BigInteger`'s square root, maybe
>> there the benefits are more visibles...
>
>> > It would be nice to see so
On Tue, 3 Sep 2024 15:49:01 GMT, fabioromano1 wrote:
> > It would be nice to see some benchmarks where it gives performance benefits.
>
> @kuksenko Try to run the benchmark of the `BigInteger`'s square root, maybe
> there the benefits are more visible...
"maybe"
So, you don't have proof th
On Tue, 3 Sep 2024 15:49:01 GMT, fabioromano1 wrote:
>> It would be nice to see some benchmarks where it gives performance benefits.
>
>> It would be nice to see some benchmarks where it gives performance benefits.
>
> @kuksenko Try to run the benchmark of the `BigInteger`'s square root, maybe
On Tue, 3 Sep 2024 14:03:16 GMT, Sergey Kuksenko wrote:
> It would be nice to see some benchmarks where it gives performance benefits.
@kuksenko Try to run the benchmark of the `BigInteger`'s square root, maybe
there the benefits are more visibles...
-
PR Comment: https://git.open
On Mon, 2 Sep 2024 16:19:01 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Mon, 2 Sep 2024 16:19:01 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Sun, 1 Sep 2024 16:32:00 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Mon, 2 Sep 2024 16:34:07 GMT, Raffaello Giulietti
wrote:
> Right, I didn't remember that `BigInteger` has its own implementation.
>
> However, reducing `MutableBigIntegerBox` to just a bunch of accessors to use
> in the unit test and the benchmarks should still be possible. Then having two
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Mon, 2 Sep 2024 16:19:01 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the v
On Mon, 2 Sep 2024 16:04:14 GMT, Raffaello Giulietti
wrote:
> * I wonder if `MutableBigIntegerBox` can be reduced to just a set of
> accessors for the `MutableBigInteger` fields. Also, I guess that the
> benchmarks can be written to use the public class `BigInteger` to avoid
> having two copi
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Sat, 31 Aug 2024 15:05:58 GMT, fabioromano1 wrote:
>> This implementation of MutableBigInteger.leftShift(int) optimizes the
>> current version, avoiding unnecessary copy of the MutableBigInteger's value
>> content and performing the primitive shifting only in the original portion
>> of the
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value array rather than in the value yet extended with trail
On Wed, 3 Jul 2024 14:17:37 GMT, fabioromano1 wrote:
> This implementation of MutableBigInteger.leftShift(int) optimizes the current
> version, avoiding unnecessary copy of the MutableBigInteger's value content
> and performing the primitive shifting only in the original portion of the
> value
This implementation of MutableBigInteger.leftShift(int) optimizes the current
version, avoiding unnecessary copy of the MutableBigInteger's value content and
performing the primitive shifting only in the original portion of the value
array rather than in the value yet extended with trailing zero
57 matches
Mail list logo