RFR: 4837946: Faster multiplication and exponentiation of large integers [v34]

fabioromano1 duke at openjdk.org
Sat Apr 26 16:44:26 UTC 2025


> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in `pow()` is not concerned most on execution time, but rather in memory optimization, because the PR implementation does the "shift of the exponent" squaring the result rather than the base, so the base is not squared like in the current implementation, and this permits to save about half of the memory.

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

  Removed  method used by nth-root

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24690/files
  - new: https://git.openjdk.org/jdk/pull/24690/files/7ceae871..cb61ddc1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24690&range=33
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24690&range=32-33

  Stats: 21 lines in 1 file changed: 0 ins; 21 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/24690.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24690/head:pull/24690

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


More information about the core-libs-dev mailing list