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

fabioromano1 duke at openjdk.org
Sun Jun 23 12:58:32 UTC 2024


> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 34 additional commits since the last revision:

 - Merge branch 'openjdk:master' into patchSqrt
 - Normalize blocks
 - Removed unused import
 - Simplification of code
 - Special cases and base case optimization
 - Inserted author
 - Merge branch 'openjdk:master' into patchSqrt
 - Merge branch 'openjdk:master' into patchSqrt
 - An optimization
 - Merge branch 'patchSqrt' of https://github.com/fabioromano1/jdk into patchSqrt
 - ... and 24 more: https://git.openjdk.org/jdk/compare/f8f85818...67c44eee

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/19710/files
  - new: https://git.openjdk.org/jdk/pull/19710/files/0baab1b9..67c44eee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19710&range=06
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19710&range=05-06

  Stats: 49 lines in 9 files changed: 7 ins; 5 del; 37 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


More information about the core-libs-dev mailing list