RFR: JDK-8323186: A faster algorithm for MutablebigInteger.divWord(long, int)

fabioromano1 duke at openjdk.org
Mon Jan 8 15:04:42 UTC 2024


The method `MutableBigInteger.divWord(long, int)` can use the algorithm of Hacker's Delight (2nd ed), section 9.3, the same used in `Long.divideUnsigned(long, long)` and `Long.remainderUnsigned(long, long)`, to get the computation faster.

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

Commit messages:
 - Merge branch 'openjdk:master' into patch-BigIntegerDivision
 - Implementation of divWord(long, int) changed

Changes: https://git.openjdk.org/jdk/pull/17291/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17291&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8323186
  Stats: 25 lines in 1 file changed: 2 ins; 5 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/17291.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17291/head:pull/17291

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


More information about the core-libs-dev mailing list