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

fabioromano1 duke at openjdk.org
Mon Jan 22 17:39:28 UTC 2024


On Mon, 22 Jan 2024 17:23:22 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

> AFAIK, IntrinsicCandidate methods are only relevant in JIT compiled code. A test that checks correctness might not reach the compilation stage, and execute only in the bytecode interpreter.
> 
> But IMO using the result of `divWord()` as suggested is simple enough and avoids hidden dependencies.

@rgiulietti Perhaps I was not clear enough. I'm not intended to use `Long.divideUnsigned(long, long)` and `Long.remainderUnsigned(long, long)` in the tests, but in the algorithm implementation, instead of using an hard-coded implementation, to use directly the assembly code, although this implies to calculate the approximations of `q` and `r` two times instead of one.

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

PR Comment: https://git.openjdk.org/jdk/pull/17291#issuecomment-1904488957


More information about the core-libs-dev mailing list