Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v9]

2024-07-04 Thread fabioromano1
On Thu, 4 Jul 2024 12:51:47 GMT, Raffaello Giulietti  
wrote:

>> @djelinski I also improved the `BigDecimal.sqrt()` algorithm exploiting 
>> `BigInteger.sqrtAndRemainder()`.
>
> @fabioromano1 I'll review your contribution starting sometimes next week.
> Please stabilize your code until then.

@rgiulietti I should have already finalized the last optimizations and 
adjustments, so I believe that the code will not undergo further changes.

-

PR Comment: https://git.openjdk.org/jdk/pull/19710#issuecomment-2209007642


Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v9]

2024-07-04 Thread Raffaello Giulietti
On Thu, 27 Jun 2024 17:28:36 GMT, fabioromano1  wrote:

>> Thanks. That's a very nice performance improvement, on my Windows machine 
>> the `testHuge...` test is about 2-3x faster, and the other 2 are slightly 
>> faster too.
>> 
>> This needs a proper review for correctness, which might take a while.
>
> @djelinski I also improved the `BigDecimal.sqrt()` algorithm exploiting 
> `BigInteger.sqrtAndRemainder()`.

@fabioromano1 I'll review your contribution starting sometimes next week.
Please stabilize your code until then.

-

PR Comment: https://git.openjdk.org/jdk/pull/19710#issuecomment-2208903977


Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v9]

2024-06-27 Thread fabioromano1
On Mon, 24 Jun 2024 17:09:30 GMT, Daniel Jeliński  wrote:

>> fabioromano1 has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Code optimization
>
> Thanks. That's a very nice performance improvement, on my Windows machine the 
> `testHuge...` test is about 2-3x faster, and the other 2 are slightly faster 
> too.
> 
> This needs a proper review for correctness, which might take a while.

@djelinski I also improved the `BigDecimal.sqrt()` algorithm exploiting 
`BigInteger.sqrtAndRemainder()`.

-

PR Comment: https://git.openjdk.org/jdk/pull/19710#issuecomment-2195275197


Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v9]

2024-06-24 Thread Daniel Jeliński
On Sun, 23 Jun 2024 19:03:38 GMT, fabioromano1  wrote:

>> I have implemented the Zimmermann's square root algorithm, available in 
>> works [here](https://inria.hal.science/inria-00072854/en/) and 
>> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root).
>> 
>> The algorithm is proved to be asymptotically faster than the Newton's 
>> Method, even for small numbers. To get an idea of how much the Newton's 
>> Method is slow,  consult my article 
>> [here](https://arxiv.org/abs/2406.07751), in which I compare Newton's Method 
>> with a version of classical square root algorithm that I implemented. After 
>> implementing Zimmermann's algorithm, it turns out that it is faster than my 
>> algorithm even for small numbers.
>
> fabioromano1 has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Code optimization

Thanks. That's a very nice performance improvement, on my Windows machine the 
`testHuge...` test is about 2-3x faster, and the other 2 are slightly faster 
too.

This needs a proper review for correctness, which might take a while.

-

PR Comment: https://git.openjdk.org/jdk/pull/19710#issuecomment-2187034545


Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v9]

2024-06-23 Thread fabioromano1
> I have implemented the Zimmermann's square root algorithm, available in works 
> [here](https://inria.hal.science/inria-00072854/en/) and 
> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root).
> 
> The algorithm is proved to be asymptotically faster than the Newton's Method, 
> even for small numbers. To get an idea of how much the Newton's Method is 
> slow,  consult my article [here](https://arxiv.org/abs/2406.07751), in which 
> I compare Newton's Method with a version of classical square root algorithm 
> that I implemented. After implementing Zimmermann's algorithm, it turns out 
> that it is faster than my algorithm even for small numbers.

fabioromano1 has updated the pull request incrementally with one additional 
commit since the last revision:

  Code optimization

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/19710/files
  - new: https://git.openjdk.org/jdk/pull/19710/files/a6559a56..073c6046

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=19710=08
 - incr: https://webrevs.openjdk.org/?repo=jdk=19710=07-08

  Stats: 15 lines in 2 files changed: 1 ins; 0 del; 14 mod
  Patch: https://git.openjdk.org/jdk/pull/19710.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19710/head:pull/19710

PR: https://git.openjdk.org/jdk/pull/19710